<?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: Can a number in an array be replaced by a variable? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579786#M78703</link>
    <description>&lt;P&gt;Matrices can be a little tricky, but here is what I do in that situation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x1 = -7.28;
x2 = 13.88;
Color Levels( (x1 |/ [-1.99 3.3 8.59]` |/ x2)` );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This uses the matrix join operator &lt;CODE class=" language-jsl"&gt;|/&lt;/CODE&gt; then a few transposes to make it have the correct dimensions&lt;/P&gt;</description>
    <pubDate>Sat, 10 Dec 2022 08:34:34 GMT</pubDate>
    <dc:creator>ErraticAttack</dc:creator>
    <dc:date>2022-12-10T08:34:34Z</dc:date>
    <item>
      <title>Can a number in an array be replaced by a variable?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579723#M78699</link>
      <description>&lt;P&gt;For example, in the drawing of JSL the following values&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Color Levels([-7.28 -1.99 3.3 8.59 13.88]);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How can I write code in this form?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x1=-7.28;
x2=13.88;
Color Levels([x1 -1.99 3.3 8.59 x2]);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:04:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579723#M78699</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-06-09T16:04:26Z</dc:date>
    </item>
    <item>
      <title>回复： Can a number in an array be replaced by a variable?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579781#M78702</link>
      <description>&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-12-10_15-58-59.png" style="width: 373px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48141iD4D6D4AFD3389364/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-12-10_15-58-59.png" alt="2022-12-10_15-58-59.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 07:59:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579781#M78702</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2022-12-10T07:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can a number in an array be replaced by a variable?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579786#M78703</link>
      <description>&lt;P&gt;Matrices can be a little tricky, but here is what I do in that situation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x1 = -7.28;
x2 = 13.88;
Color Levels( (x1 |/ [-1.99 3.3 8.59]` |/ x2)` );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This uses the matrix join operator &lt;CODE class=" language-jsl"&gt;|/&lt;/CODE&gt; then a few transposes to make it have the correct dimensions&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 08:34:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579786#M78703</guid>
      <dc:creator>ErraticAttack</dc:creator>
      <dc:date>2022-12-10T08:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can a number in an array be replaced by a variable?</title>
      <link>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579817#M78710</link>
      <description>&lt;P&gt;If you construct your matrix using the Matrix() function you can call in variables as arguments directly. For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x1=-7.28;
x2=13.88;
mat = matrix({x1,-1.99, 3.3, 8.59, x2})`
//notice&amp;nbsp;the&amp;nbsp;need&amp;nbsp;to&amp;nbsp;transpose;&amp;nbsp;the&amp;nbsp;syntax&amp;nbsp;is&amp;nbsp;easier&amp;nbsp;to&amp;nbsp;construct&amp;nbsp;this&amp;nbsp;way&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here's a more complete building the entire matrix dynamically:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

x1=100000; x2=1000000; x3=10000000;

dt = Open( "$SAMPLE_DATA/PopAgeGroup.jmp" );
obj = dt &amp;lt;&amp;lt; Bubble Plot(
	X( :"Portion 0-19"n ),
	Y( :"Portion60+"n ),
	Sizes( :Pop ),
	ID( :Country ),
	Coloring( :Pop )
);
obj &amp;lt;&amp;lt; Color Levels( matrix({x1,x2,x3})` );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2026"&gt;@jules&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 16:09:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-a-number-in-an-array-be-replaced-by-a-variable/m-p/579817#M78710</guid>
      <dc:creator>jules</dc:creator>
      <dc:date>2022-12-10T16:09:18Z</dc:date>
    </item>
  </channel>
</rss>

