Skip to main content
1-Visitor
September 1, 2017
Solved

Defining a Curve

  • September 1, 2017
  • 1 reply
  • 9920 views

Hello to all,

 

I am interested to know if it is possible to mathmatically define a curve as a function. i.e. if I have an xy plot which I have created a curve for i.e. a polyfit or similar. Is it then possible to get MathCAD to define that plot as a function of x? i.e. if I have a polyfit line (which I understand to essentialy be an extrapolation of the xy plots themselves) can this polyfit line be defined as a function i.e. y(x)?

 

Thanks,

 

Andy

Best answer by Werner_E

Here is a sheet in Prime 3.0 format.

Hope it helps.

To use the function without the data availabe you would copy simply the "coeffs" vector (set Prime to show more decimals for better precision) and assign it a variable "coeffs" which you then can use for the function definition as shown.

Bild1.png

 

1 reply

24-Ruby IV
September 1, 2017

The regress function returns coefficients of the polinomal for the approximation!

awibroe1-VisitorAuthor
1-Visitor
September 1, 2017

Any advice on how that works?

19-Tanzanite
September 1, 2017

@awibroe wrote:

Say for example I have a series of data and I fit a curve to this as in the attached. What I am now interested in doing is expressing the produced curve as a function of x so that I could not plot the curve without the need to reproduce the data and could simply plot the function. Is this possible?


Not using polyfit, no. Use polyfitc instead (which replaces regress) to return the coefficients of the polynomial, then use the coefficients to define a function.