<?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: Absolute value between all points in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41317#M24115</link>
    <description>&lt;P&gt;Awesome solutions! Both work really well for what I'm doing. I like the 'Distance()' function, I'll have to look into it more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a follow up question:&lt;BR /&gt;Both these solutions essentially produce a matrix with the distance between each point in the cell. I was wondering if there is an easy&amp;nbsp;way to remove either the lower or upper triangle of the matrix? I don't need both sides and it will make analysis easier.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jun 2017 14:15:29 GMT</pubDate>
    <dc:creator>SG</dc:creator>
    <dc:date>2017-06-28T14:15:29Z</dc:date>
    <item>
      <title>Absolute value between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41284#M24091</link>
      <description>&lt;P&gt;I was wondering if there is an easy way to aggregate the absolute value of all points in a column to one another. I have written some scripts which will give me the stage location data for a tool, but I want to see how the locations measure up relative to themselves rather than the absolute locations of the machine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;If I have 3 points, I want to know the distance between 1-2, 1-3, and 2-3.&lt;/P&gt;&lt;P&gt;If I have 4 points, I want to know the distance between 1-2, 1-3, 1-4, 2-3, 2-4, and 3-4.&lt;/P&gt;&lt;P&gt;And so on...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For small data sets this can easily be done, but I have data sets ranging from 20-100 points. I am looking for something built in or possibly an idea to script the solution. Any help is much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 21:48:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41284#M24091</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2017-06-27T21:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute value between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41285#M24092</link>
      <description>&lt;P&gt;I think this might do what you want:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
a = dt:weight &amp;lt;&amp;lt; get values;
b = a;
c = [];
For( i = 1, i &amp;lt;= N Rows( a ), i++,
	c = c || abs( a[i] - b);
	dt &amp;lt;&amp;lt; New Column( "col" || Char( i ), values( c[0, i] ) );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Jun 2017 01:21:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41285#M24092</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-06-28T01:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute value between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41309#M24108</link>
      <description>&lt;P&gt;You might also use the 'Distance()' function (see 'Help &amp;gt; Scripting Guide'):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
// Data
v = [1, 2, 3, 4];
// Compute Euclidean distance between all pairs of points
dm = Sqrt(Distance(v, v));
dt = AsTable(dm);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Jun 2017 10:09:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41309#M24108</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-06-28T10:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute value between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41310#M24109</link>
      <description>&lt;P&gt;Nice&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 10:42:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41310#M24109</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-06-28T10:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute value between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41317#M24115</link>
      <description>&lt;P&gt;Awesome solutions! Both work really well for what I'm doing. I like the 'Distance()' function, I'll have to look into it more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a follow up question:&lt;BR /&gt;Both these solutions essentially produce a matrix with the distance between each point in the cell. I was wondering if there is an easy&amp;nbsp;way to remove either the lower or upper triangle of the matrix? I don't need both sides and it will make analysis easier.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 14:15:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41317#M24115</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2017-06-28T14:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute value between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41327#M24117</link>
      <description>&lt;P&gt;I guess that 'easier' depends on what else your code does, and how. But if you want teh matrix to be lower triangular you could use:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
// Data
v = [1, 2, 3, 4];
// Compute Euclidean distance between all pairs of points
dm = Sqrt(Distance(v, v));
// Make matrix dm lower triangular
dm2 = J(NRow(dm), NCol(dm), .);
for (r=1, r&amp;lt;=NRow(dm), r++,
	dm2[r, 1::r] = dm[r, 1::r];
);
dt = AsTable(dm2);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Jun 2017 16:58:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41327#M24117</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-06-28T16:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute value between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41330#M24120</link>
      <description>&lt;P&gt;Perfect! Thank you, this was indeed easy for my application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a python script running that extracts and then reads the location data from an XML file into a CSV. Then I am using JMP to analyze the stage locations from the CSV. So, I don't have any other jsl for what I'm trying to do...yet.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jun 2017 18:24:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Absolute-value-between-all-points/m-p/41330#M24120</guid>
      <dc:creator>SG</dc:creator>
      <dc:date>2017-06-28T18:24:45Z</dc:date>
    </item>
  </channel>
</rss>

