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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Form an equation from table data

MP_10748008
2-Explorer

Form an equation from table data

Hi, 

 

I have a table of data as given below. I want a function or equation of the data. So that I can find the y value for desired x value.

Please guide me how to do that in Mathcad. I'm using Mathcad Prime 9.0

 

xy
6.2215
9.1153
13111
1597
1882
2267
2462
2755
3050
3346
3642
3939
4335
4733
5130
5 REPLIES 5
ttokoro
20-Turquoise
(To:MP_10748008)

Check Prime help of minner. It shows how to do it.

image.pngimage.pngimage.pngimage.png

Hi,

 

Thank you for the detail.

 

When I re-calculate Y using f(x) function, I'm getting values with +/-1.6 error. How to minimize the error further?

 

xy
(Existing data)
Y
(Calculated data using function f(x))
Error (y-Y)
6.2215216.6173939-1.617393929
9.1153152.01122220.9887777664
13111109.37073781.629262187
159795.838194611.161805388
188280.994277151.005722847
226767.29994691-0.2999469128
246262.10633191-0.1063319106
275555.70858169-0.7085816934
305050.54613325-0.5461332521
334646.28949998-0.2894999786
364242.71728555-0.7172855481
393939.6751177-0.6751176959
433536.25596522-1.255965218
473333.39831321-0.3983132065
513030.97302218-0.9730221783
ttokoro
20-Turquoise
(To:MP_10748008)

Change the assuming function Y(x):=ax^b such as ax^b+c, ax^3+bx^2+cx^1+d, etc.. 

It looks like you have some responses from some community members. If any of these replies helped you solve your question please mark the appropriate reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Regards,
Andra
Werner_E
25-Diamond I
(To:MP_10748008)

Basically you have the choice between an interpolation or a function fit.

 

In case of an interpolation in Prime you have the choice between linear interpolation and cubic spline interpolation. An interpolated function runs exactly through all the given data points, but its behaviour inbetween might not always be as expected or desired.

 

In case of a function fit (regression) usually you get a function whose graph may not include any of the given data points exactly (as in Terrys appraoch) but gives an overall good fit. You have to guess which function type may apply as Prime provides not means to autoselect an appropriate function type like specialized programs like CurveExpert Pro will do.

 

If you need further help, come back here and ask and don't forget to attach your worksheet.

 

So first you will have to decide if you need an interpolation or a regression.

Here are a few examples for both:

Werner_E_0-1712161689816.pngWerner_E_1-1712161705182.png

Werner_E_2-1712161750958.png

Werner_E_3-1712161783188.png

Werner_E_4-1712161820234.png

Werner_E_5-1712161852705.png

 

 

 

 

 

Announcements

Top Tags