LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the Max and Min from an XY graph...

Hello Fellows....
 
I'm just trying to caculate the mean value fron an XY Graph between the cursors position.
I know that I need to retrive with a loop the Y values corresponding to each X values between the cursors but don't know how to handle that.
 
I've attached the GRAPH.vi that generate the graph, LABVIEW8.0
Thank for any inputs... 
 
0 Kudos
Message 1 of 8
(3,502 Views)
Try this:  Take the position of the cursor and then search the x array for the position.  Then get the data from the array using the index of the found value (see pic).  You can then feed the output array into the mean function of the Mathmatics pallete (if you have it) or you can do the calc programtically pretty easily.

I dont have your txt file so I cant test it but let me know if it works.
Kenny

Message 2 of 8
(3,490 Views)

Thanks very much I'll try and keep you posted on that issue....

see in attached file the txt file.Smiley Wink

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

I am pretty sure that it will work, if you add in some tolerances.

Right not if you dont get 0 or 0.1 exactly, it wont output any data.  So it will need some toleranceing to be able to get an actual point.

If you get stuck let me know.

Kenny

Message 4 of 8
(3,473 Views)
Here is your modified VI which calculates the mean.
 
 
Message 5 of 8
(3,473 Views)

Thanks for your rapid and really good support....you confirm your proven statusSmiley Wink

 

See you soon...

0 Kudos
Message 6 of 8
(3,460 Views)
Just a note, the algorithm you have assumes that the x values are sorted.  An XY graph does not force that, so you may want to keep that in mind.
0 Kudos
Message 7 of 8
(3,449 Views)
You are right, Evan.
 
The assumption is that the x-axis is time which is forever incrementing (thus sorted).  If it is not, you may get surprising results. Smiley Surprised
 
RayR
Message 8 of 8
(3,438 Views)