Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
Hey everyone
Can someone show me how to plot a smooth curve from given data in mathcad?
The problem is attach below
Thank you 🙂
Solved! Go to Solution.
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:
Hi,
use h1 and Q1 to form a cspline. Use an interpolation of the cspline on a larger number of points.
Cheers
Terry
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.
Thank you very much for the fast reply
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: