LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numerical integration - area under the curve

Hi Everyone

 

I have been trying to do this for a few days now, but I can't seem to get it to work quite right. 

 

I am trying to calculate area under the curve of several thousand points.     This is just a simple version of it. 

 

My data points come from an encoder that measures position on the X axis.   On the Y axis are some forces.    

 

The X positions won't always be uniformly spaced.    Ie.  41500, 40000, 35000, 30000, 35000, 36000, 37000, 41500.     There would not be any that are  back to back the same though.   (ie.  41500, 41500).

 

I keep getting a -20008 error saying "Analysis:  The input arrays do not contain the correct number of data values for this function."

 

Can someone take a look and help me out please?  The numeric version is not working correctly.   I get the error above.      Additionaly when I use the other method and my X values start decreasing I get an error as well.     So I am kind of stuck both ways. 

 

I am using both uneven integration method and the normal numeric method since I am not 100% which one to use.     

 

Thanks

Mike

 

0 Kudos
Message 1 of 3
(4,078 Views)

Hi,

 

      You are using 2 variables integration f(x,y), and you have only 1 f(x).

 

      If you use:

               Input Array = Y

               dt = 1

               integration method: trapezoidal rule

               Single (1D Numeric Integration)

 

      That work 😉

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 2 of 3
(4,070 Views)

You Cannot use Numeric Integration.vi on data the has an uneven sample rate.  Why the error does not accurately reflect this is probably a bug.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(4,069 Views)