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?

25-Diamond I
September 1, 2017

@awibroe wrote:

Just leading on from this I have been playing with this again with the most simple of excercised i.e. x=y in the attached.


I can't see any attachment.

 


I was looking to see if MC can tell you what function the line/ curve is. i.e. in this case you would expect the result x=y or y(x)=x. I guess this is not acheiveble?

Your guess is correct. As Richard already explained, thats a mission impossible.

When you see this, what would you think, the equation of the underlying function is?

Bild1.png

Perhaps we have here a linear process with a few inaccurate measurement results?

Bild2.png

Lets reveal the secret - I used the function equation seen in the picture

Bild3.png

You may say, that the straight line above wasn't a perfect match anyway - thats correct.

But here are two perfect matches - all six points lie exactly on the curves.

Here we have y=sin(x):

Bild4.png

And here is a polynomial of sixth order:

Bild5.png

And there sure is an infinite number of other function which include those six points perfectly.

So what should Mathcad return? 🙂