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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Plot smooth curves in Mathcad

fahmed-2
12-Amethyst

Plot smooth curves in Mathcad

Hello Everyone,

Can you please show me how to plot a smooth compaction curve from a given data using Mathcad.

Thank you

14 REPLIES 14
RichardJ
19-Tanzanite
(To:fahmed-2)

I'm not into typing, so look up the spline functions. You can use them to interpolate to get a smooth curve.

If you want more than that then please post the data. If you have Prime 3.1 then a lot of people can't read the worksheets, so please post the data in another format.

As Richard already said - use spline interpolation.

The attached file should help

WE

RichardJ
19-Tanzanite
(To:Werner_E)

I know I only had to type 10 values, but at 7 pm, with dinner waiting, I was feeling exceptionally lazy

fahmed-2
12-Amethyst
(To:RichardJ)

Hahaahaaaa Richard.....thanks for the help. I have developed my work using your example. I have attached my part with this reply. I have also shown a trend that comes up in excel with similar data......the first one seems to match but for the second one, it had some problem in mathcad as it showed a lower bump , so i had to omit the values that did not show a bump and matched that with excel. Also, my interpolation function is not on the tool bar so every time I needed this function, I had to call all functions and find from that. can you help me with that also......Thanks ( sorry again to request you during your dinner time again  )

Offtop.

Richard,

Really? You don't want to exchange the dinner for a portion of the fresh differential equations in partial derivatives ?

Hmm, seemingly, that till a dinner was the whole two hours, but you didn't want to type.

fahmed-2
12-Amethyst
(To:fahmed-2)

Hahaahaaaa Richard.....thanks for the help. I have developed my work using Werner's  example. I have attached my part with this reply. I have also shown a trend that comes up in excel with similar data......the first one seems to match but for the second one, it had some problem in mathcad as it showed a lower bump , so i had to omit the values that did not show a bump and matched that with excel. Also, my interpolation function is not on the tool bar so every time I needed this function, I had to call all functions and find from that. can you help me with that also......Thanks ( sorry again to request you during your dinner time again  )

RichardJ
19-Tanzanite
(To:fahmed-2)

Sorry, your file is in Prime 3.1 format, so I can't open it.

It's a long way from dinner time. Lunch is getting close though

Try please a web sheet on Mathcad Server http://twt.mpei.ac.ru/MCS/Worksheets/Math/spline.xmcd

I can't read P3.1 files, either.

But I guess you will first have to decide if you want an interpolation (like the splines) or a regression/approximation/best fit like the trend curves in Excel. If the latter is the case, you have to decide which function type you'd like to follow and you may want to look up "Functions-Data Analysis-Curve Fitting" in the help.

WE

fahmed-2
12-Amethyst
(To:fahmed-2)

Sorry guys.....for convenience I am attaching a word file

Thanks

Your compaction curve from EXCEL is simply EXCEL's "smoothed curve" plot

Plotted without curve fit, Mathcad gives similar:

Given just 5 points and knowing nothing about the process behind its hard up to impossible to say, which curves describes the process better.

But "cspline" tends to oscillate so you may use "lspline" instead, if you think that it better fits your needs. You may also try "pspline" (not much difference here).

If you think its worth the effort you may also play around with B-Spline-Interpolation (bspline(), look it up in the help).

As far as I know Excel is using Bezier splines of third order when asked to do a smoothed curve plot.

Regards

Werner

Here is an approach using "bspline" which is even a little closer to what Excel is showing, I guess.

Play around with the values in joints.

Werner

-MFra-
21-Topaz II
(To:fahmed-2)

Hello Faisal, it could be useful the following procedure you need to adjust a graph consisting of a few points (ie a broken function) with a solid line ..

fitfunc.jpg

My solution for mathcad prime 3.1

aboutinterp.jpg

But I am a little puzzled because the graph is prolonged beyond j = 11 point.

Top Tags