LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate without Express VIs

Solved!
Go to solution

I need to integrate a data array (2-D array double), but I don't have native integral VIs that come with the full development system. Nor do I wish to use the express VI.

 

Is the attached an effective way to integrate X-Y data? Any ideas for improvements?

 

Thanks

0 Kudos
Message 1 of 7
(2,967 Views)

If you downconvert your VI to LV10 or below, I will take a look (Files>>Save for Previous Version).

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 2 of 7
(2,956 Views)

Wait...I see something a bit fishy.  If Input is a step function that works but if we apply the trapizoidal rule you would want to add the lower value of X(n) and X(n-1) times delta Y + 1/2 Delta X * Y


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 7
(2,952 Views)

Woops this look better?

 

Any ideas for improvements?

0 Kudos
Message 4 of 7
(2,937 Views)

not quite.

 

attach the vi and we may help tweek it to implement the function I discribed earlier


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 7
(2,931 Views)

Here you go!

 

Thanks

0 Kudos
Message 6 of 7
(2,929 Views)
Solution
Accepted by topic author ap8888

Wasn't to far off.

 

Essentially if you draw the shape on a graph,  you can think of a series of trapizoids between each successive points. the areas for each can be split into a rectanlgle ((min(Y,Y-1)*dX)  and a triangle (1/2 abs( dY)*dX)  sum the two and add to the previous area.

 

And as snippet

TR.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(2,922 Views)