Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hello,
Does Mathcad have any function to integrate an array without doing a polyfit? If you see attached, I have a 14 point array and would like to find the area under the curve. What would be the best and cleanest way to accomplish this?
(Note: I had to attach a picture because it wasn't letting me attach a mathcad file for some reason)
Solved! Go to Solution.
In addition to polyfit (which does a least squares approximation for the order you specify) there are a host of spline fits that will hit the points exactly. For your data that is probably a better fit to get an integratable function. Note that since your function is both positive and negative the "area under the curve" will require careful definition.
For a quick and dirty answer linterp will draw straight lines from point to point and can be integrated.
In addition to polyfit (which does a least squares approximation for the order you specify) there are a host of spline fits that will hit the points exactly. For your data that is probably a better fit to get an integratable function. Note that since your function is both positive and negative the "area under the curve" will require careful definition.
For a quick and dirty answer linterp will draw straight lines from point to point and can be integrated.
EXTREMELY helpful. Thank you very much
This is exactly what I needed, thank you very much for your help on this so quickly!