<?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: Copying data from Matrix to JMP file in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255287#M50117</link>
    <description>&lt;P&gt;Here's one way to put a 2D matrix into a table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;matr = [1 2 3, 4 5 6, 7 8 9];

nr = nrows(matr);
nc = ncols(matr);

dt = new table("Matrix Version", add rows(nr),
		new column("c1", numeric, continuous)
);

for (i = 1, i &amp;lt;= nc, i++,
	one_col = "c" || char(i);
	if (i &amp;gt; 1,
		dt &amp;lt;&amp;lt; new column(one_col);
	);
	column(dt, one_col) &amp;lt;&amp;lt; set values(matr[1::nc,i]);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Ditto on RTFM.&lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2020 14:23:19 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2020-03-31T14:23:19Z</dc:date>
    <item>
      <title>Copying data from Matrix to JMP file</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255266#M50110</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imported the data from the column properties into a matrix. My question is how can I copy data from matrix into JMP file?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Spec2 = Function( {co},
	a = Column( co ) &amp;lt;&amp;lt; get property( "Spec limits" );
	b = a["UL"];
	C = Matrix( {b} );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Copying data from Variable C into JMP file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 13:31:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255266#M50110</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2020-03-31T13:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Copying data from Matrix to JMP file</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255276#M50114</link>
      <description>&lt;P&gt;There are many ways to move data from a matrix into a JMP Data Table.&amp;nbsp; So the method to use, is really dependent upon what/where you are going to put the matrix data in the data table.&amp;nbsp; A JMP Data Table can be dealt with as if it is just a big two dimensional matrix, several one dimensional matrices,&amp;nbsp; A Column and row, much like Excel, etc.&lt;/P&gt;
&lt;P&gt;So in your sample, if you were moving your b matrix into a data table you could specify&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt[1,5] = b[1];
// or
Column(1)[5] = b[1];
// or
dt:mySpecs[5] = b[1];
// or
dt &amp;lt;&amp;lt; New Column("mySpecs", set values(b));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I strongly suggest you read the sections in the Scripting Guide on Matrices in Chapter 7, and all of Chapter 9, which covers Data Table programming.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;JMP Documentation Library...…….Scripting Guide&lt;/P&gt;
&lt;P&gt;Additionally, in your sample function, you seem to be pulling out the Upper Spec Limit, from the Spec Limits column property.&amp;nbsp; You are referencing it at "UL".&amp;nbsp; The List element name is "USL"&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 14:06:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255276#M50114</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-31T14:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Copying data from Matrix to JMP file</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255287#M50117</link>
      <description>&lt;P&gt;Here's one way to put a 2D matrix into a table:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;matr = [1 2 3, 4 5 6, 7 8 9];

nr = nrows(matr);
nc = ncols(matr);

dt = new table("Matrix Version", add rows(nr),
		new column("c1", numeric, continuous)
);

for (i = 1, i &amp;lt;= nc, i++,
	one_col = "c" || char(i);
	if (i &amp;gt; 1,
		dt &amp;lt;&amp;lt; new column(one_col);
	);
	column(dt, one_col) &amp;lt;&amp;lt; set values(matr[1::nc,i]);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Ditto on RTFM.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 14:23:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255287#M50117</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2020-03-31T14:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Copying data from Matrix to JMP file</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255312#M50122</link>
      <description>&lt;P&gt;&lt;LI-MESSAGE title="Convert Matrix to Data Table and Back" uid="48496" url="https://community.jmp.com/t5/JSL-Cookbook/Convert-Matrix-to-Data-Table-and-Back/m-p/48496#U48496" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;is another answer to converting a matrix to a table.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 18:30:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255312#M50122</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-03-31T18:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Copying data from Matrix to JMP file</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255315#M50123</link>
      <description>&lt;P&gt;Thanks Craige - where has &lt;STRONG&gt;AsTable()&lt;/STRONG&gt; been hiding all of my life!!??&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 15:53:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255315#M50123</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2020-03-31T15:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copying data from Matrix to JMP file</title>
      <link>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255319#M50126</link>
      <description>&lt;P&gt;It hides well:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Does not have "matrix" in its name, needs an alias like MatrixToDataTable.&lt;/LI&gt;&lt;LI&gt;Mis-categorized in the scripting index as a row function.&lt;/LI&gt;&lt;LI&gt;A matrix is a primitive type in JMP, not an object, so the function is not associated with an object.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11257"&gt;@EvanMcCorkle&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/494"&gt;@XanGregg&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/579"&gt;@sheila_loring&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/1855"&gt;@Justin_Chilton&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2020 16:42:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Copying-data-from-Matrix-to-JMP-file/m-p/255319#M50126</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-03-31T16:42:04Z</dc:date>
    </item>
  </channel>
</rss>

