<?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: Measure distance between all points in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Measure-distance-between-all-points/m-p/181205#M40249</link>
    <description>&lt;P&gt;Did you see the Distance() function? Here is an example from the Scripting Index of a script using it:&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 );
/*1-D example*/
exX1 = [1, 2, 3, 4];
exX2 = [2, 4, 6, 8]; 
/*Compute squared Euclidean distance*/
exD = Distance( exX1, exX2 ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum( (exX1[exi, 0] - exX2[exj, 0]) ^ 2 )
	)
);
Show( exDm == exD ); 

/*2-D example*/
exX1 = [1 1, 2 2, 3 3, 4 4];
exX2 = [2 1, 4 2, 6 0, 8 7]; 
/*Compute squared Euclidean distance*/
exD = Distance( exX1, exX2 ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum( (exX1[exi, 0] - exX2[exj, 0]) ^ 2 )
	)
);
Show( exDm == exD ); 

/*2-D example*/
exX1 = [1 1, 2 2, 3 3, 4 4];
exX2 = [2 1, 4 2, 6 0, 8 7]; 
/*Compute squared Euclidean distance, with a scaler [0.5 2.0]*/
exD = Distance( exX1, exX2, [0.5 2.0] ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum(
			[0.5 2.0] :* (
			Abs( exX1[exi, 0] - exX2[exj, 0] ) ^ 2)
		)
	)
);
Show( exDm == exD ); 

/*2-D example*/
exX1 = [1 1, 2 2, 3 3, 4 4];
exX2 = [2 1, 4 2, 6 0, 8 7]; 
/*Compute squared Euclidean distance, with scalers [0.5 2.0] and powers [1.5 2.0]*/
exD = Distance( exX1, exX2, [0.5 2.0], [1.5 2.0] ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum(
			[0.5 2.0] :* (
			Abs( exX1[exi, 0] - exX2[exj, 0] ) :^ [
			1.5 2.0])
		)
	)
);
Show( exDm == exD );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 01 Mar 2019 20:58:48 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2019-03-01T20:58:48Z</dc:date>
    <item>
      <title>Measure distance between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Measure-distance-between-all-points/m-p/181187#M40248</link>
      <description>&lt;P&gt;I am trying to determine a meausre of how distance from a point effects measurements to find a minimum / maximum point within range of points.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to do this in the attached files but I cannot find a way to do this programatically.&amp;nbsp; I tried to do this by concatenating a table of N rows, N times, copying the XY coulmn, sorting Y then X then pastingn this sorted column into the NxN table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to do this with EVAL / SUBSTITUTION but cannot get it to successfuly execute.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 20:54:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Measure-distance-between-all-points/m-p/181187#M40248</guid>
      <dc:creator>JumpingAC</dc:creator>
      <dc:date>2019-03-01T20:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Measure distance between all points</title>
      <link>https://community.jmp.com/t5/Discussions/Measure-distance-between-all-points/m-p/181205#M40249</link>
      <description>&lt;P&gt;Did you see the Distance() function? Here is an example from the Scripting Index of a script using it:&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 );
/*1-D example*/
exX1 = [1, 2, 3, 4];
exX2 = [2, 4, 6, 8]; 
/*Compute squared Euclidean distance*/
exD = Distance( exX1, exX2 ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum( (exX1[exi, 0] - exX2[exj, 0]) ^ 2 )
	)
);
Show( exDm == exD ); 

/*2-D example*/
exX1 = [1 1, 2 2, 3 3, 4 4];
exX2 = [2 1, 4 2, 6 0, 8 7]; 
/*Compute squared Euclidean distance*/
exD = Distance( exX1, exX2 ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum( (exX1[exi, 0] - exX2[exj, 0]) ^ 2 )
	)
);
Show( exDm == exD ); 

/*2-D example*/
exX1 = [1 1, 2 2, 3 3, 4 4];
exX2 = [2 1, 4 2, 6 0, 8 7]; 
/*Compute squared Euclidean distance, with a scaler [0.5 2.0]*/
exD = Distance( exX1, exX2, [0.5 2.0] ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum(
			[0.5 2.0] :* (
			Abs( exX1[exi, 0] - exX2[exj, 0] ) ^ 2)
		)
	)
);
Show( exDm == exD ); 

/*2-D example*/
exX1 = [1 1, 2 2, 3 3, 4 4];
exX2 = [2 1, 4 2, 6 0, 8 7]; 
/*Compute squared Euclidean distance, with scalers [0.5 2.0] and powers [1.5 2.0]*/
exD = Distance( exX1, exX2, [0.5 2.0], [1.5 2.0] ); 
/*Verify result*/
exDm = J( 4, 4, . );
For( exi = 1, exi &amp;lt;= 4, exi++,
	For( exj = 1, exj &amp;lt;= 4, exj++,
		exDm[exi, exj] =
		Sum(
			[0.5 2.0] :* (
			Abs( exX1[exi, 0] - exX2[exj, 0] ) :^ [
			1.5 2.0])
		)
	)
);
Show( exDm == exD );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 20:58:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Measure-distance-between-all-points/m-p/181205#M40249</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-03-01T20:58:48Z</dc:date>
    </item>
  </channel>
</rss>

