Skip to main content
1-Visitor
April 11, 2018
Solved

Making a smooth curve in mathcad

  • April 11, 2018
  • 4 replies
  • 3336 views

Hey everyone

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

The problem is attach below

Thank you 🙂

Best answer by Fred_Kohlhepp

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

21-Topaz II
April 11, 2018

Hi,

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

Cheers

Terry

25-Diamond I
April 11, 2018

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

Bodum1-VisitorAuthor
1-Visitor
April 12, 2018

Thank you very much for the fast reply

23-Emerald I
April 11, 2018

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