<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Invalid Matrix Token in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395267#M64590</link>
    <description>I am having trouble concatenating using Concat() or |/ my starting array and additional elements. When I Write() the output, it is equivalent to the starting array, nothing was concatenated (result is [0 0]).</description>
    <pubDate>Tue, 22 Jun 2021 19:48:44 GMT</pubDate>
    <dc:creator>mostarr</dc:creator>
    <dc:date>2021-06-22T19:48:44Z</dc:date>
    <item>
      <title>Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395234#M64585</link>
      <description>&lt;P&gt;Hi. I didn't find anything about this beside &amp;lt;&lt;A href="https://community.jmp.com/" target="_blank"&gt;https://community.jmp.com/t5/Discussions/invalid-matrix-token/td-p/2111&amp;gt;&lt;/A&gt;&amp;nbsp;(a terribly formatted post) and nothing in the Scripting Index. What is an "invalid matrix token" error? What does it mean?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to instantiate a matrix in my script like&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;m = [i j];&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;where &amp;lt;i&amp;gt; and &amp;lt;j&amp;gt; are numerical variables, it throws the error and points at i.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that's all the context I can give. Let me know if any clarification specifically is in order, I can try to help you help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:50:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395234#M64585</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2023-06-09T19:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395253#M64586</link>
      <description>&lt;P&gt;Cannot exactly explain the error message. Most likely related to this&lt;A href="https://www.jmp.com/support/help/en/16.0/index.shtml#page/jmp/construct-matrices.shtml#" target="_blank" rel="noopener"&gt; Construct Matrices&lt;/A&gt; and in the end:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Construct Matrices from Expressions&lt;/EM&gt;&lt;/P&gt;&lt;P class="body"&gt;&lt;EM&gt;&lt;STRONG&gt;To construct matrices from expressions, use &lt;SPAN class="code"&gt;Matrix()&lt;/SPAN&gt;.&lt;/STRONG&gt; Elements must be expressions that resolve to numbers.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
i = 1;
k = 1;
m = Matrix({{i, k}}); //[1 1]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 19:10:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395253#M64586</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-22T19:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395265#M64588</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;. That works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you comment briefly on dimensionality? I think I figured it out, {{}{}} is a 2x0, but I don't know how to make a 0x2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 19:30:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395265#M64588</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2021-06-22T19:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395266#M64589</link>
      <description>&lt;P&gt;Play around with this example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
i = 1;
k = 1;
m1 = Matrix({{i, k}}); //(1x2)
m2 = Matrix({{i}, {k}}); //(2x1)
Show(m1, m2);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and check the Construct Matrices From Lists from the link I provided earlier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 19:56:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395266#M64589</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-22T19:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395267#M64590</link>
      <description>I am having trouble concatenating using Concat() or |/ my starting array and additional elements. When I Write() the output, it is equivalent to the starting array, nothing was concatenated (result is [0 0]).</description>
      <pubDate>Tue, 22 Jun 2021 19:48:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395267#M64590</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2021-06-22T19:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395268#M64591</link>
      <description>Okay will do, sorry about the unneccesary post down there, didn't see your response here. Thank you greatly!</description>
      <pubDate>Tue, 22 Jun 2021 19:49:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395268#M64591</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2021-06-22T19:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395272#M64593</link>
      <description>&lt;P&gt;For Matrix Concatenation JMP Help will most likely have the answers &lt;A href="https://www.jmp.com/support/help/en/16.0/index.shtml#page/jmp/concatenation.shtml#" target="_blank" rel="noopener"&gt;JMP Help - Matrix Concatenation &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also remember to set the value to old matrix if you want to change the value&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
i = 1;
k = 1;
m1 = Matrix({{i, k}}); //(1x2)
Write(m1);
Write("\!N");
m1 |/= [2 2]; //or m1 = m1 |/ [2 2]; or m1 = VConcat(m1, [2 2]);
Write(m1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Jun 2021 20:04:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395272#M64593</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-22T20:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid Matrix Token</title>
      <link>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395499#M64618</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;provided an answer with hard to find syntax.&amp;nbsp; I am adding on a bit as an FYI. Being a senior citizen, I still like the concept of allocating space for matrix stoage and releasing unused. It saves the need to concatenate, and might be a time savings especially for potentially large matrices.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, I think a simple method to create matrices is to use JMP's J function, it is listed in the Scripting Index &amp;gt; Functions &amp;gt; Matrix.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is a simple script demonstrating its use.&amp;nbsp; FYI.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

m1x2 = J( 1, 2, 0 );         // a 1x2 matrix of zeros 
m2x1 = J( 2, 1, Empty() );   // a 2x1 matrix all empty values

Show( m1x2, m2x1 );

imax = 100;
jmax = 1000;

//like an ALLOCATE or DIM
mm = J( imax, jmax, Empty() );

//within the program logic and counting say imax = 5 and jmax =3;
imax = 5;
jmax = 3;

//like a redimension 
mm = mm[1 :: imax, 1 :: jmax];

Show( mm, N Col( mm ), N Row( mm ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 13:44:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Invalid-Matrix-Token/m-p/395499#M64618</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2021-06-23T13:44:29Z</dc:date>
    </item>
  </channel>
</rss>

