<?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: How can I calculate the intersection point of two functions in JMP? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12589#M11971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The minimize function might do what you need if your functions are well behaved.&amp;nbsp; In this example, the black reference line is automatically placed at the intersection of the red and green curves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;BR /&gt;&lt;P&gt;f1 = Function( {a}, Abs( a ) ^ 1.5);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;f2 = Function( {a}, 10 / a );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;intersect_X = 1;// guess a value&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Minimize( Abs( f1( intersect_X ) - f2( intersect_X ) ), {intersect_X}, &amp;lt;&amp;lt;tolerance(1e-3) );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;New Window( "Example",&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Graph Box(&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xaxis( Add Ref Line( intersect_X, "Solid", "Black", "", 1 ) ),&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X Scale( -5, 5 ), Y Scale( -20, 20 ),&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pen Color( "red" ); Y Function( f1( a ), a );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pen Color( "green" ); Y Function( f2( a ), a );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8850_intersect.PNG" style="width: 738px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1599iDF6DBC03DFA2E2F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8850_intersect.PNG" alt="8850_intersect.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Oct 2016 23:24:31 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2016-10-18T23:24:31Z</dc:date>
    <item>
      <title>How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12588#M11970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am graphing two functions in JMP using the YFunction command in JSL. I would like to calculate the point where they intersect. How should I do this either manually or in JSL?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 16:12:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12588#M11970</guid>
      <dc:creator>smushieduckface</dc:creator>
      <dc:date>2015-06-02T16:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12589#M11971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The minimize function might do what you need if your functions are well behaved.&amp;nbsp; In this example, the black reference line is automatically placed at the intersection of the red and green curves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;BR /&gt;&lt;P&gt;f1 = Function( {a}, Abs( a ) ^ 1.5);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;f2 = Function( {a}, 10 / a );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;intersect_X = 1;// guess a value&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Minimize( Abs( f1( intersect_X ) - f2( intersect_X ) ), {intersect_X}, &amp;lt;&amp;lt;tolerance(1e-3) );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;New Window( "Example",&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Graph Box(&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xaxis( Add Ref Line( intersect_X, "Solid", "Black", "", 1 ) ),&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X Scale( -5, 5 ), Y Scale( -20, 20 ),&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pen Color( "red" ); Y Function( f1( a ), a );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Pen Color( "green" ); Y Function( f2( a ), a );&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8850_intersect.PNG" style="width: 738px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1599iDF6DBC03DFA2E2F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8850_intersect.PNG" alt="8850_intersect.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 23:24:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12589#M11971</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-10-18T23:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12590#M11972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works great, thanks! Do you know how I can output the x-coordinate of the intersection using that? The black line shows up perfectly but I cannot see the x-value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 17:39:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12590#M11972</guid>
      <dc:creator>smushieduckface</dc:creator>
      <dc:date>2015-06-02T17:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12591#M11973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the JSL variable, intersect_X, holds the result of the minimize function.&amp;nbsp; (minimize uses it for an initial guess, then modifies it.)&amp;nbsp; You should check if F1(intersect_X) is close enough to F2(intersect_X) to meet your requirements.&amp;nbsp; A bad initial guess might prevent it from working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 17:46:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12591#M11973</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2015-06-02T17:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12592#M11974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or, if you just want it on the graph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xaxis( Add Ref Line( intersect_X, "Solid", "Black",&lt;STRONG&gt;&lt;EM&gt; char(intersect_x,6,4)&lt;/EM&gt;&lt;/STRONG&gt;, 1 ) ),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8845_intersect2.PNG" style="width: 410px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1600i41C9A9D71561425D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8845_intersect2.PNG" alt="8845_intersect2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;6,4 is the field width and number of decimal digits after formatting the number to characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 23:24:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12592#M11974</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-10-18T23:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12593#M11975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly what i needed, thanks! It works perfectly. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 18:26:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12593#M11975</guid>
      <dc:creator>smushieduckface</dc:creator>
      <dc:date>2015-06-02T18:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12594#M11976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can interactively find the intersection in this example using a slightly higher level of JMP machinery by using the Profiler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. New table with columns X and Y, 2 rows with values -5 and 5 for x.&lt;/P&gt;&lt;P&gt;2. Formula for Y: abs(x)^1.5 - x/10&lt;/P&gt;&lt;P&gt;3. Invoke standalone profiler&lt;/P&gt;&lt;P&gt;4. Specify Y as the prediction formula&lt;/P&gt;&lt;P&gt;5. Specify the desirability function to be Target = 0.&lt;/P&gt;&lt;P&gt;6. Maximize desireability&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will then get the solution X value spelled out on the X-axis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 18:43:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12594#M11976</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2015-06-02T18:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12595#M11977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I specify desirability to be Target = 0? I keep getting stuck on that part. This seems to be exactly what i need. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 13:20:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12595#M11977</guid>
      <dc:creator>smushieduckface</dc:creator>
      <dc:date>2015-06-05T13:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12596#M11978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. Graph &amp;gt; Profiler&lt;/P&gt;&lt;P&gt;2. Y --&amp;gt; Y, Prediction Formula&lt;/P&gt;&lt;P&gt;3. Click on red triangle button next to "Prediction Profiler"&lt;/P&gt;&lt;P&gt;4. Click on Desirability Functions&lt;/P&gt;&lt;P&gt;5. Alt-Click the upper right hand box&lt;/P&gt;&lt;P&gt;6. Click the Maximize Button and change to Match Target&lt;/P&gt;&lt;P&gt;7. Change the Values to 20, 0, and -20 (for High, Middle, and Low)&lt;/P&gt;&lt;P&gt;8. Click Ok&lt;/P&gt;&lt;P&gt;9. Click on the red triangle button next to "Prediction Profiler"&lt;/P&gt;&lt;P&gt;10. Click on Maximize Desirability&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At various stages you may want to fiddle with the axes to more clearly display what is going on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 15:01:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/12596#M11978</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2015-06-05T15:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/842600#M101636</link>
      <description>&lt;P&gt;Dear Craige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry to bother you almost after a decade here. I guess that is what happens with the timeless functions.&lt;/P&gt;&lt;P&gt;I am getting this error while running your script. Would you happen to know what thisi could be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UntamedKoala_0-1739945088807.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/73102iAB6EDEE0CE8C23EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UntamedKoala_0-1739945088807.png" alt="UntamedKoala_0-1739945088807.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 06:05:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/842600#M101636</guid>
      <dc:creator>UntamedKoala</dc:creator>
      <dc:date>2025-02-19T06:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I calculate the intersection point of two functions in JMP?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/842758#M101649</link>
      <description>&lt;P&gt;Not sure why; two ideas:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;close any date tables that have columns of the same names used in the JSL&lt;/LI&gt;
&lt;LI&gt;check the spelling of the variable names (perhaps use copy-paste the same name to each)...I can't be positive from the picture, but one of the underscores might be a look-alike character.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I copied and pasted the code into JMP 16, 17, 18, and JMP 19 EA and it still works. Maybe the JMP log window will tell you a bit more. What version of JMP are you using? Be great to hear what the answer is, let us know.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Craige_Hales_0-1739966109180.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/73149iFB47A18D2FF72EB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Craige_Hales_0-1739966109180.png" alt="Craige_Hales_0-1739966109180.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 12:06:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-calculate-the-intersection-point-of-two-functions-in/m-p/842758#M101649</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2025-02-19T12:06:24Z</dc:date>
    </item>
  </channel>
</rss>

