LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numerical integration of unevenly spaced data

Hello all,

Is there a VI (or does anybody have one) that can integrate unevenly spaced numerical data? I know the basic numerical integrator only works for evenly spaced data (data spaced at a constant interval)..

Thanks for youe help....

Jay Poret, Ph.D.
AOT, Inc.
0 Kudos
Message 1 of 4
(3,699 Views)
Help for the Numeric Integrator.vi shows the formulas. For the trapezoidal rule (the simplest one) the integral is the sum of partial sums which are given by: 1/2(x[i] + x[i + 1])*dt.

If you change dt to dt(i) = t[i+1] - t[i], I think this should give you a reasonable approximation. The more complex rules cannot use this approach. The trapezoidal rule simply sums the area under the trapezoids created by connecting the t[i], x[i], x[i+1], t[i+1] dots, so this change should not introduce any errors.
0 Kudos
Message 2 of 4
(3,699 Views)
John,

Thanks for the reply...I believe I solved the problem by creating a VI based on fitting my data with a cubic spline and then generating new y data based on evenly spaced x data. It actually works pretty well..
The trick is to use the two cubic spline Vis in the processing tools....
0 Kudos
Message 3 of 4
(3,699 Views)
Radman, could you go into more detail on what it is you are doing here? This is exactly what I want to do and I'm not sure what you are talking about by using two cubic spline VI's
0 Kudos
Message 4 of 4
(3,699 Views)