LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from a XY graph

I made a XY graph from an array. I want to read the corresponding value of X from a graph. Is it possible to do this ?

 

0 Kudos
Message 1 of 6
(3,436 Views)

You know the data going in.  So you can use Threshold 1D Array and Interpolate 1-D array to get the corresponding X value for any given Y value.

0 Kudos
Message 2 of 6
(3,411 Views)

Can you tell me how to do that ?

0 Kudos
Message 3 of 6
(3,406 Views)

See this older thread.

http://forums.ni.com/t5/LabVIEW/Finding-a-Y-value-for-a-given-X-value/m-p/2490730

 

Altenbach's message in that thread http://forums.ni.com/t5/LabVIEW/Finding-a-Y-value-for-a-given-X-value/m-p/2490820#M760269 was the best implementation and only required a cluster and an interpolate 1-D array.

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

I tried to do that but I m not getting any ans.

I want the left one to be my Y and the right to be my X.

Please check this

0 Kudos
Message 5 of 6
(3,360 Views)

I don't know what you are referring to when you talk about the left one vs. the right one.

 

There is something I had forgotten about with Interpolate 1-D array.  And I'm not finding it clearly documented in the help for that function right now.  But I believe it requires the numbers for Y to be in an increasing order.

 

So try putting in a Reverse 1-D array for both the X and Y inputs before bundling them in the cluster.

0 Kudos
Message 6 of 6
(3,352 Views)