01-19-2012 12:54 PM
I need to integrate a data array (2-D array double), but I don't have native integral VIs that come with the full development system. Nor do I wish to use the express VI.
Is the attached an effective way to integrate X-Y data? Any ideas for improvements?
Thanks
Solved! Go to Solution.
01-19-2012 02:12 PM
If you downconvert your VI to LV10 or below, I will take a look (Files>>Save for Previous Version).
01-19-2012 02:20 PM - edited 01-19-2012 02:25 PM
Wait...I see something a bit fishy. If Input is a step function that works but if we apply the trapizoidal rule you would want to add the lower value of X(n) and X(n-1) times delta Y + 1/2 Delta X * Y
01-19-2012 03:44 PM
Woops this look better?
Any ideas for improvements?
01-19-2012 03:53 PM
not quite.
attach the vi and we may help tweek it to implement the function I discribed earlier
01-19-2012 03:55 PM
Here you go!
Thanks
01-19-2012 04:36 PM
Wasn't to far off.
Essentially if you draw the shape on a graph, you can think of a series of trapizoids between each successive points. the areas for each can be split into a rectanlgle ((min(Y,Y-1)*dX) and a triangle (1/2 abs( dY)*dX) sum the two and add to the previous area.
And as snippet