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

Integrating an Array

dmayfield
4-Participant

Integrating an Array

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)

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

5 REPLIES 5

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.

examples

EXTREMELY helpful. Thank you very much

This is exactly what I needed, thank you very much for your help on this so quickly!

LucMeekes
23-Emerald II
(To:dmayfield)

A serious bug in this forum often prevents from attaching a mathcad file. In Windows Explorer click with the right-mouse button on the mathcad file and select 'Send to' -> 'Compressed (zipped) folder'. The resulting .zip file can be attached.  
As you can see, that's what Fred did to attach his file...
Success! Luc
Announcements