Skip to main content
1-Visitor
Solved

Making a smooth curve in mathcad

Hey everyone

Can someone show me how to plot a smooth curve from given data in mathcad?

The problem is attach below

Thank you 🙂

23-Emerald I

The two answers given (MF and Werner) address splines.  A spline will (by definition) pass exactly thru the data points you supply.

 

Another scenario that often happens produces data that was generated empirically; where the form of the function can be deduced from the physical problem and there is some uncertainty in the measured data.  In that case a least squares fit to the data that determines the coefficients of the function may be a better solution:

Capture.PNG

4 replies

terryhendicott
21-Topaz II

Hi,

use h1 and Q1 to form a cspline.   Use an interpolation of the cspline on a larger number of points.

Cheers

Terry

Translate
Werner_E
25-Diamond I

There are some points you have to consider when creating a spline interpolation:

1) The abscissa values must be in ascending order. Thats not the case in your example. So you simply may reverse both vectors Q1 and h1

 

2) When plotting with units you will have to provide a range variable where you must specify the first, second and last value and aplly units to all three values

 

3) you may use any of the cubic splines available in Mathcad - lspline, pspline or cspline. Difference is how the ends of the splines are treated - of course all three a cubic splines.

Bild.png

Translate
Bodum1-VisitorAuthor
1-Visitor

Thank you very much for the fast reply

Translate
23-Emerald I

The two answers given (MF and Werner) address splines.  A spline will (by definition) pass exactly thru the data points you supply.

 

Another scenario that often happens produces data that was generated empirically; where the form of the function can be deduced from the physical problem and there is some uncertainty in the measured data.  In that case a least squares fit to the data that determines the coefficients of the function may be a better solution:

Capture.PNG

Translate