From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate area under XY graph

Hello to all, I am plotting the data acquired from the system as amplitude v/s time on XY graph. My task is to calculate are under the graph and am using integrator tool to achieve this. However, feel that am not using correctly as answer is not matching with expected value. For example, I have plotted y=x function and as per the definition area is equal to 0.5*height*base for area under the graph. It is not matching, kindly help as I want to find out area under the curve for any two points of X-axis.

0 Kudos
Message 1 of 5
(3,950 Views)

 

The integration gets accurate in your case if you change the integration method to 'trapezoidal' instead of the default 'Simpson's Rule'.

 

Simpson's Rule probably doesnt work because you don't provide suitable Initial and Final conditions. This method needs an assumption about the borders of the integration interval.

 

Cheers

Edgar

Message 2 of 5
(3,941 Views)

yes, you are right.Now need to find area between two particular X-axis points.

 

Thanks a lot. 

0 Kudos
Message 3 of 5
(3,917 Views)

Is there any way to calculate if dt is not fixed??? 

0 Kudos
Message 4 of 5
(3,890 Views)

Yes.  Use the Uneven Numeric Integration VI.

Message 5 of 5
(3,879 Views)