LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get x-value's corresponding to y-value in a graph

how can i  get x-axis values corresponding to y-axis value from a graph.here i will specify y-axis value and the vi should return me the corresponding x-axis value from the graph.

 

provide me with an vi.

mpsingh
0 Kudos
Message 1 of 5
(5,431 Views)

Assuming a waveform graph, just threshold the data in the graph by the y valye you want, this gives you the X index, multiply by dx and add x offset to get the correcpoiding X value.  This assumes a function with only 1 X per Y value.  Cursors are a useful way of doing thsi as well, snap the cursor to the plot and move it the point of interest then look at the cursor X,Y.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 5
(5,423 Views)

 Hi M.P.Singh,

   I want to ask some questions...Are you wiring an array to the graph or wiring an waveform data type to graph or a dynamic data type...If you are wiring an array,then the x values are nothing but indices of the array...

   If you are wiring a waveform data type,then you can make use of waveform pallette vis ...

   If you are using dynamic data type,convert it to waveform data type and use...

   It will be good if you post a screen shot of your program..

 

 

Thanks and regards,

srikrishnaNF

 

Regards,
Srikrishna


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

Hi Singh

 

There are different ways to do this depending on your type of data to the graph. I have just answered a very similar question to this that had more details. look here.

 

The example there shows looking for the value of x corrosponding to the max value of y. If you are after a specific value of y, you could search for the value of y, get its index and then subsitute that value for the maximum y index in the shown example

 

Rgs,

 

Lucither

Message Edited by Lucither on 05-03-2010 05:18 AM
------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 4 of 5
(5,382 Views)

Just one thing to remember:

The values are "non-analog", both x and y-values.

So either you should work with bandwidth around the values you are interested in or you should interpolate.

Never compare floating points with "equal"!

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 5
(5,362 Views)