07-29-2020 02:33 PM
Forewarning: I'm fairly new to LabVIEW but still know the basic ins and outs...
I'm attempting to integrate under a curve and I need my program to set the range of the integration to the minimum and maximum of the x scale. I have a slider and numeric controls set up in an event structure that let the user decide the min and max of the X scale. How would I program the integration to adjust the range when the user changes the range?
Thank you!
07-29-2020 02:34 PM
Hi edowker,
@edowker wrote:
How would I program the integration to adjust the range when the user changes the range?
By choosing the correct subset of your (plot) data using an ArraySubset function…
07-29-2020 02:53 PM
That makes sense...however I'm still a bit confused on how you would use the numeric integration function to read both the subarray x data as well as the y data from the XY graph. I'm sure there's a simple answer but I'm just not seeing it, so thank you for helping!
07-29-2020 03:25 PM
It makes a tremendous difference if your array consists of samples (equally-spaced Y values with a constant "dt" (or "dx") value between points along the X axis, or if it consists of a set of x-y pairs where both X and Y can vary independently. You neither showed us your code, nor your data.
Suppose you didn't have a computer. Further suppose you've never had a Calculus class, but did have a set of data points. Is there a way, with pencil and paper, you could "integrate" these data? Then that's your Algorithm, translate it into LabVIEW. See GerdW's suggestion about isolating a "subset" of the data (which I assume is held in an Array) ...
Bob Schor