LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of Integration VI

Solved!
Go to solution

I want to use the basic integration VI .

However I don't have a formula for the input, I have an X and Y one dimensional arrays,

 

 How could I use this VI with just the one dimensional arrays rather than a formula?

 

0 Kudos
Message 1 of 24
(399 Views)

Do you have evenly spaced data points? If so, use Mathematics >> Integ & Diff >> Integral x(t) #

It is in vi.lib\Analysis\2dsp.llb\Integral x(t).vi

Message 2 of 24
(385 Views)

Try attached implementation of trapezoid rule.

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
Message 3 of 24
(335 Views)

@LED47 wrote:

I want to use the basic integration VI .

However I don't have a formula for the input, I have an X and Y one dimensional arrays,

 

 How could I use this VI with just the one dimensional arrays rather than a formula?


 

Your two input arrays differ in size so integration will fail. Can you attach a VI with clean data?

 

What is the output you want?

 

 

Message 4 of 24
(314 Views)

Once you clean up your data such that both arrays have equal length and x is sorted and does not contain duplicates, here's what you could do.

 

altenbach_0-1765569634132.png

 

(Sorry, I originally had x and y reversed. I reattach a corrected version. Why would they call the lower input "T" instead of "X"????)

 

 

Message 5 of 24
(310 Views)

Integration should not need duplicate time values removed. Yes, I understand that the recommended palette VIs could return an error, but that seems to be an unnecessary restriction.
The following data is easily integrated by hand, and should be supported by the integration VIs:

dsbNI_0-1765569074466.png


**Update** Uneven Numeric Integration VI allows for duplicate time values. It only returns an error if sorting changes the order and there's one or more duplicates in T

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 6 of 24
(291 Views)

dsb@NI wrote:

Integration should not need duplicate time values removed. Yes, I understand that the recommended palette VIs could return an error, but that seems to be an unnecessary restriction.


Hmmm,... So what would the integral be for the following data where the same X has multiple different Y values? I guess the result would depend on the order of the duplicates.

 

T, X

1, 5

2, 6

3, 8

3, 1000

3,-20

4, 80

5, 100

 

(Yes, I originally had the inputs swapped and got the duplicate error)

0 Kudos
Message 7 of 24
(281 Views)

I need a graph of the running interval for all points

0 Kudos
Message 8 of 24
(198 Views)

Thank you everybody for what you've given me so far 

0 Kudos
Message 9 of 24
(197 Views)

@LED47 wrote:

Thank you everybody for what you've given me so far 


... so, is your problem solved or do you still have questions?

0 Kudos
Message 10 of 24
(178 Views)