<?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: Nonlinear curve fitting of piecewise-defined function in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407604#M159745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Richard Jackson wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Unfortunately, your worksheet is in Prime 3.1 format, and I have Prime 3.0, which can't read it (ridiculous, but true: Prime file formats are not even compatible within a major release version, and Prime cannot save a file back to any earlier version).&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am waiting from PTC Mathcad team for a new technology: We cannot read Prime 3.0 files in Mathcad 3.1 and 4.0 &lt;IMG src="https://community.ptc.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2015 14:20:45 GMT</pubDate>
    <dc:creator>ValeryOchkov</dc:creator>
    <dc:date>2015-09-25T14:20:45Z</dc:date>
    <item>
      <title>Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407602#M159743</link>
      <description>As suggested by the title, I'm attempting to fit a piecewise-defined curve to a set of data points.&amp;nbsp; This is also the first time I have used Mathcad, so it is exceedingly likely I'm missing something obvious.&amp;nbsp; My worksheet is attached to this post.I'm attempting to follow</description>
      <pubDate>Thu, 03 May 2018 15:06:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407602#M159743</guid>
      <dc:creator>dwarren</dc:creator>
      <dc:date>2018-05-03T15:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407603#M159744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, your worksheet is in Prime 3.1 format, and I have Prime 3.0, which can't read it (ridiculous, but true: Prime file formats are not even compatible within a major release version, and Prime cannot save a file back to any earlier version). So I can't answer question 1. For question 2, you would be better off using a solve block with minerr, which can handle constraints. The answer to question 3 is yes, in principle. Without seeing the worksheet I can't say why you are getting an error though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a particular reason you are using Mathcad Prime rather than Mathcad 15?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 13:59:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407603#M159744</guid>
      <dc:creator>RichardJ</dc:creator>
      <dc:date>2015-09-25T13:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407604#M159745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Richard Jackson wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Unfortunately, your worksheet is in Prime 3.1 format, and I have Prime 3.0, which can't read it (ridiculous, but true: Prime file formats are not even compatible within a major release version, and Prime cannot save a file back to any earlier version).&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am waiting from PTC Mathcad team for a new technology: We cannot read Prime 3.0 files in Mathcad 3.1 and 4.0 &lt;IMG src="https://community.ptc.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 14:20:45 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407604#M159745</guid>
      <dc:creator>ValeryOchkov</dc:creator>
      <dc:date>2015-09-25T14:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407605#M159746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Don Warren wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;As suggested by the title, I'm attempting to fit a piecewise-defined curve to a set of data points.&amp;nbsp; This is also the first time I have used Mathcad, so it is exceedingly likely I'm missing something obvious.&amp;nbsp; My worksheet is attached to this post.&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;
&lt;P&gt;I'm attempting to follow the example at &lt;A class="jive-link-external-small" href="http://www.phys.uconn.edu/~hamilton/phys258/P/genfit.pdf" rel="nofollow" target="_blank"&gt;http://www.phys.uconn.edu/~hamilton/phys258/P/genfit.pdf&lt;/A&gt;, but when I call the genfit routine, I get the error "This value must be a function".&lt;/P&gt;
&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;
&lt;P&gt;So, &lt;STRONG&gt;question number 1:&lt;/STRONG&gt; what is this error message trying to tell me, and how can I resolve it?&lt;/P&gt;


&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What it's telling you, after using the error trace facility, is that you have type d(...) in several instances.&amp;nbsp; Mathcad interprets this to mean that d is a function; you need to explicitly type the multiplication operator between d and the parenthesis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After this, you have another slight problem.&amp;nbsp; Your guess values for x = 0, give F(x) = complex, which genfit won't handle.&amp;nbsp; Looking at your expression for f, this is because with b and e positive, you will get roots of negative numbers.&amp;nbsp; The fix is to make b and e negative.&amp;nbsp; It should work then. See attached modification to your worksheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 2: Don't have time to look at it, unfortunately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question 3: It appears as if Mathcad can't directly symbolically solve conditional functions.&amp;nbsp; You can break the function up and take the derivatives of each part, though ... but not a very good choice.&amp;nbsp; Probably imposes because the results, without much thought about constraints, could turn out to be horrendously messy!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interestingly, the example worksheet you were working from doesn't work as written in Prime, because the genfit solver algorithm (an Optimized L-M) is quite fussy about initial values.&amp;nbsp; In Mathcad 15 you have the option to choose an ordinary L-M solver, which gives the expected answer.&amp;nbsp; In Prime you have to amend the guess value to [500, -0.1]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 14:31:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407605#M159746</guid>
      <dc:creator>StuartBruff</dc:creator>
      <dc:date>2015-09-25T14:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407606#M159747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Richard Jackson wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Is there a particular reason you are using Mathcad Prime rather than Mathcad 15?&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a question I *can* answer.&amp;nbsp; I just bought Mathcad as part of starting a new postdoc (my Ph.D. advisor has been using Mathcad since its single-digit version number days).&amp;nbsp; When I searched on PTC's website, I didn't find a way to buy Mathcad 15.&amp;nbsp; After further looking just now I still don't.&amp;nbsp; If 15 is more powerful than Prime (and is available for purchase) then maybe I should contact PTC about upgrading to a potentially more useful version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 16:55:58 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407606#M159747</guid>
      <dc:creator>dwarren</dc:creator>
      <dc:date>2015-09-25T16:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407607#M159748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is this error trace facility you're referring to?&amp;nbsp; Is it a feature that exists in Prime 3.1?&amp;nbsp; (The first Google hit suggested that right-clicking on the offending function's name should bring up a ... something ... but that doesn't happen.)&amp;nbsp; On the other hand, Prime 3.1 also has a button for converting xmcd files that is permanently grayed-out and unusable, so this may be something of a trend.&amp;nbsp; I really should look into Mathcad 15, whatever that is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 17:02:23 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407607#M159748</guid>
      <dc:creator>dwarren</dc:creator>
      <dc:date>2015-09-25T17:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407608#M159749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;Don Warren wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;What is this error trace facility you're referring to?&amp;nbsp; Is it a feature that exists in Prime 3.1?&amp;nbsp; (The first Google hit suggested that right-clicking on the offending function's name should bring up a ... something ... but that doesn't happen.)&amp;nbsp; .&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Look on the Calculation tab in the Ribbon.&amp;nbsp; You should see a collection of slightly washed-out red "video" buttons in the Error Tracing group.&amp;nbsp; Click on the expression with an error and the buttons should get brighter (they don't always; it depends on whether the error tracing facility can look back any further than the expression with the error).&amp;nbsp;&amp;nbsp; You then click on the appropriate Error Trace button to follow the calculations back to where Prime thinks the problem originated.&amp;nbsp; Your next task is then to work out what the sometimes cryptic error messages actually mean! &lt;IMG src="https://community.ptc.com/legacyfs/online/emoticons/devil.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The right-click Google suggestion refers to error tracing in Mathcad 15.&amp;nbsp; I actually prefer the Prime method of tracing errors, but I do miss M15's debug window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;On the other hand, Prime 3.1 also has a button for converting xmcd files that is permanently grayed-out and unusable, so this may be something of a trend.&amp;nbsp; I really should look into Mathcad 15, whatever that is.&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You need to have Mathcad 15 installed for the xmcd converter to work.&amp;nbsp; If you have a full Prime 3.1, rather than Prime Express, you are automatically licenced for a copy of Mathcad 15.&amp;nbsp; If you haven't got it with your Prime distribution, then you can download it from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.ptc.com/product/mathcad/free-trial" rel="nofollow" target="_blank"&gt;http://www.ptc.com/product/mathcad/free-trial&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should definitely check it out, if only to make you realize what Prime is still missing compared to the original Mathcad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... and, to be fair, to notice Prime's&lt;/P&gt;&lt;P&gt;significant improvements in matrix entry, &lt;/P&gt;&lt;P&gt;mixed unit arrays &lt;/P&gt;&lt;P&gt;and change from static type checking (a form of Nannyware introduced in Mathcad 12 that stopped some people from making unit errors at design time but really hacked off a number of experienced users by stopping them doing useful and interesting things)&lt;/P&gt;&lt;P&gt;Oh, and control-J for entering programming keywords .... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stuart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 17:22:35 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407608#M159749</guid>
      <dc:creator>StuartBruff</dc:creator>
      <dc:date>2015-09-25T17:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Nonlinear curve fitting of piecewise-defined function</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407609#M159750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your license for Prime will also work for Mathcad 15, which you can download here: &lt;A href="http://www.ptc.com/product/mathcad/free-trial/thank-you"&gt;http://www.ptc.com/product/mathcad/free-trial/thank-you&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mathcad 15 is more powerful than Prime in almost all respects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2015 17:51:09 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/Nonlinear-curve-fitting-of-piecewise-defined-function/m-p/407609#M159750</guid>
      <dc:creator>RichardJ</dc:creator>
      <dc:date>2015-09-25T17:51:09Z</dc:date>
    </item>
  </channel>
</rss>

