LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to integrate an Array with the other Array???

Solved!
Go to solution

Hi guys, 

 

I have such a problem that need your help!!

 

I have two columns, the first column is Time (x): 1, 1.2, 1.5, 1.7, 1.8... which is uneven array.

 

The second column is Y :  3, 5, 7, 8....

 

X and Y have the same length, but the x is uneven. Now I want to do the integration of Y on x. When I use the uneven numeric integration, I found that the integration result is only one value instead of an array. But what I need is the third column which shows the integration results C. So I could plot C against x, and know how the integration goes.

 

Does anyone has such an experience, thanks a lot!Smiley Happy

 

Basically, what I need is just like the integration what the Origin Pro does.

 

Tao

 

Capture.PNG

0 Kudos
Message 1 of 8
(3,224 Views)

What do you mean by "X is uneven"?

 

What do you mean by column C to see how the integration goes?  Do you mean that you want to see the integration from X0 to the current X step by step throughout the whole array?

0 Kudos
Message 2 of 8
(3,200 Views)

Is this what you are looking for?

 

0 Kudos
Message 3 of 8
(3,182 Views)
Solution
Accepted by topic author tzou

Or at little bit cleaner code...

0 Kudos
Message 4 of 8
(3,180 Views)

Yes, exactly.

0 Kudos
Message 5 of 8
(3,160 Views)

Hey,

 

I input the same T and current values as you gave to Origin Pro, and do the integration, the values are different from this VI. I am confusedSmiley Happy

0 Kudos
Message 6 of 8
(3,147 Views)

Chris' VI just does a continuous summation of the Y values.  It failed to do the multiplication by the dX.

 

You still haven't said what you meant by uneven X.  Did you mean that the delta X's are unequal?

0 Kudos
Message 7 of 8
(3,134 Views)

Hey, Thanks for your reply.

 

I have figured this out based on what Origin does.

 

Thanks again.

0 Kudos
Message 8 of 8
(3,120 Views)