cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

MathCAD Prime 2.0 polyfitc() Function

ptc-2638235
1-Visitor

MathCAD Prime 2.0 polyfitc() Function

Ok all you MathCad experts, I have a really annoying problem. I have a worksheet that performs the following tasks: data is input via a text file into a 3D array, next it curve fits the data, and finally I want to be able to read the coeffecients of the function. The problem occurs when I try to symbolically evaluate the curve fit. I use a the general form of a polynomial to the nth power to display the polynomial, but when I symbolically evaluate it MathCAD returns the very function that was called earlier. This makes sense, but it is not how previous versions worked. Anyone know of a symbolic modifier that would fix the issue? I attached the document with a similar example; the real version is proprietary.

Thanks all!

Jacob

10 REPLIES 10
RichardJ
19-Tanzanite
(To:ptc-2638235)

I would consider that a bug.

Thanks for the input, but I don't like your answer (although you are most likely correct ). Can anyone disprove Mr. Jackson?

May be so?

symbprime.bmp

Viktor

Viktor

Isn't that worksheet static though? It looks like, on the second to last line of code, that you have to copy what is returned for "a" into the new definition of "a" (a=[] versus a:=)

RichardJ
19-Tanzanite
(To:ptc-2638235)

There is one kludge that should work. Write the coefficients to a file, then read them back in again. That should break the link to the polyfitc function.

To a mathCAD file? Or...

RichardJ
19-Tanzanite
(To:ptc-2638235)

To a text file. Use WRITEPRN and READPRN

Nope! This doesn't seem to work either!

readprn.PNG

Well, I suppose you are right that it breaks the link to the polyfitc function; but it isn't quite what is really wanted!

Alan

RichardJ
19-Tanzanite
(To:AlanStevens)

You are right. Guess I should have checked first.

Similar problems have been posted before. In Mathcad 15 (and earlier versions) it's possible to use a scripted component to break the link, but I can't think of a way to do it in Prime.

Jacob Stockton wrote:

... but it is not how previous versions worked.

What makes you think so? I've just tried M11 and it exhibits the same behaviour (though I had to use genfit, as it doesn't have polyfitc).

Alan

Announcements

Top Tags