LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I calculate areas under the curves above and below the x axis at 0?

The xy graph generated is similar to a sinusoidal representing the magnetic intensity of the poles of a motor. For each of the four areas above and below the x axis at 0 I would like to calculate the area then do a variance analysis on the 8 areas. Can anyone suggest a method to calculate each of the 8 areas. See the attached vi to understand better what I'm trying to do.

 

Thank you.

0 Kudos
Message 1 of 6
(4,887 Views)

I cannot open the vi because I have LV2010, However you can check the link below

 

https://decibel.ni.com/content/docs/DOC-13010

 

Hope this helps

Message 2 of 6
(4,875 Views)

Thank you for the example, but I'd like to do it programmatically for each area without the user having to move the cursors since it is part of an automated process.

0 Kudos
Message 3 of 6
(4,863 Views)

Could you post your code in LV2010, I cannot open it since I have LV2010

0 Kudos
Message 4 of 6
(4,861 Views)

there is not much in the VI to look at.

 

For numerical analysis, it might be sufficient to do the "numerical integral" - just add the numbers, each multiplied with your Delta-x. To determine the areas in your special case, just look check if < or > 0.0

It might not be the best solution, but for this amount of datapoints it will work well enough.

 

Maybe this quick and dirty solution might help you out already (;

Message 5 of 6
(4,859 Views)

Hi all,

 

If you are simply looking to do numeric integration, there is built in functionality to do that.  The help file is here:

 

http://zone.ni.com/reference/en-XX/help/371361H-01/gmath/numeric_integration/

 

You will may have to do some edge checking if you want to break this down into individual components.

 

Let us know if you need any more assistance

 

Applications Engineer
National Instruments
Message 6 of 6
(4,844 Views)