03-11-2014 05:05 PM
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!
Basically, what I need is just like the integration what the Origin Pro does.
Tao
Solved! Go to Solution.
03-11-2014 06:00 PM
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?
03-11-2014 06:50 PM
Is this what you are looking for?
03-11-2014 06:55 PM
Or at little bit cleaner code...
03-11-2014 08:47 PM
Yes, exactly.
03-11-2014 10:07 PM
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 confused
03-11-2014 11:06 PM - edited 03-11-2014 11:08 PM
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?
03-11-2014 11:48 PM
Hey, Thanks for your reply.
I have figured this out based on what Origin does.
Thanks again.