<?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: Convert Matrix to List? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2575#M2575</link>
    <description>You can use the LOC function to locate all rows of a matrix that are equal to a value.  Consider the following example:&lt;BR /&gt;&lt;BR /&gt;If my matrix is&lt;BR /&gt;&lt;BR /&gt;     m=[1,3,3,6,7,1,3,9]&lt;BR /&gt;&lt;BR /&gt;then use the following to locate all rows of that matrix that are equal to 3:&lt;BR /&gt;&lt;BR /&gt;     loc(m==3)&lt;BR /&gt;&lt;BR /&gt;This returns the following result&lt;BR /&gt;&lt;BR /&gt;     [2,3,7]&lt;BR /&gt;&lt;BR /&gt;which is a matrix of row numbers of m that are equal to 3.&lt;BR /&gt;&lt;BR /&gt;If you leave off the loc function and just use m==3, then you get a matrix of 1's and 0's, with a 1 indicating the value is equal to 3.</description>
    <pubDate>Fri, 29 Oct 2010 17:39:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-29T17:39:08Z</dc:date>
    <item>
      <title>Convert Matrix to List?</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2574#M2574</link>
      <description>Hi JMP folks,&lt;BR /&gt;&lt;BR /&gt;I can do this in a loop, but is there a simple one-liner to convert a one-dimensional matrix to a list?  Something like:&lt;BR /&gt;&lt;BR /&gt;cell_list = getmatrixaslist(cell_matrix);&lt;BR /&gt;&lt;BR /&gt;Additional bonus question: is there an equivalent to the list LOC function for a matrix?  I need to locate all rows in a matrix with a certain value.  The LOC function does this for lists, but for matrices it finds all elements equal to 0.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;Peter</description>
      <pubDate>Fri, 29 Oct 2010 14:47:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2574#M2574</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2010-10-29T14:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Matrix to List?</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2575#M2575</link>
      <description>You can use the LOC function to locate all rows of a matrix that are equal to a value.  Consider the following example:&lt;BR /&gt;&lt;BR /&gt;If my matrix is&lt;BR /&gt;&lt;BR /&gt;     m=[1,3,3,6,7,1,3,9]&lt;BR /&gt;&lt;BR /&gt;then use the following to locate all rows of that matrix that are equal to 3:&lt;BR /&gt;&lt;BR /&gt;     loc(m==3)&lt;BR /&gt;&lt;BR /&gt;This returns the following result&lt;BR /&gt;&lt;BR /&gt;     [2,3,7]&lt;BR /&gt;&lt;BR /&gt;which is a matrix of row numbers of m that are equal to 3.&lt;BR /&gt;&lt;BR /&gt;If you leave off the loc function and just use m==3, then you get a matrix of 1's and 0's, with a 1 indicating the value is equal to 3.</description>
      <pubDate>Fri, 29 Oct 2010 17:39:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2575#M2575</guid>
      <dc:creator />
      <dc:date>2010-10-29T17:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Matrix to List?</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2576#M2576</link>
      <description>Here's the syntax for converting a 1D matrix to a list:&lt;BR /&gt;&lt;BR /&gt;cell_list = as list (cell_matrix);</description>
      <pubDate>Fri, 29 Oct 2010 18:50:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2576#M2576</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-10-29T18:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Matrix to List?</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2577#M2577</link>
      <description>Thank you very much for your responses.  It's easy when you know how!</description>
      <pubDate>Fri, 29 Oct 2010 19:06:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-Matrix-to-List/m-p/2577#M2577</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2010-10-29T19:06:50Z</dc:date>
    </item>
  </channel>
</rss>

