LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find automatically corresponding X value(s) from known Y value(s)

Hi all!
 
I'm using labview7.1 and I need to find corresponding X value(s) from known Y value(s).
 
I have sample data as Attachment. In that data I need to find automatically X values which corresponds Y(90). Optional it would be very nice if I can draw vertical line form Y point to X point in chart 🙂
 
Please help!
 
 
 
 


Message Edited by Zealous on 11-28-2007 10:05 AM
0 Kudos
Message 1 of 8
(3,244 Views)
It sounds like the easiest solution would be to use the cursor option on your plot.  Right click the chart, go to Visible Items and select Cursor Legend.  Then right click within the cursor legend and select Create Cursor-> Single Plot.  This should do what you want.

CHeers
0 Kudos
Message 2 of 8
(3,238 Views)
Yep I know that solution, but I need solution which do that automatically. Just corresponding X values in indicator or in array will do. I wil do some calculation also with those values so I really need automated solution.. Is there any function which finds X value from given Y?
0 Kudos
Message 3 of 8
(3,218 Views)

If the data is simple and you are guaranteed to have only two points that match, you can use "threshold array" of the array and of the reversed array, then do some math on the found indices. 🙂

See how far you get.

(Of course you could also fit the data to a real lineshape (e.g. gaussian) and get the width from the best fit parameters.)

0 Kudos
Message 4 of 8
(3,208 Views)

Here's one simple posibility. Use threshold array to find where it reaches 90, then continue with the inverted array and search for -90 for the second index.



Message Edited by altenbach on 11-28-2007 10:10 AM
0 Kudos
Message 5 of 8
(3,203 Views)

Hi!

Actually it seems that my data has everytime two points that should match. Thou I am using labview 7.1 without fancy gaussian fits or so on.. 😞  My optional goal was to get full width at half maximum (FWHM) from my data (would be most welcome) But back to my problem I didnt get it how to use those threshold array functions to solve my case.. well I try to find out tomorrow when i'm back to office..

Thanks for the tips so far 🙂

0 Kudos
Message 6 of 8
(3,198 Views)
:D! Thank you Altenbach! While I was typing my bad english you post another tip! I will try your solution tomorrow 🙂
 
Cheers!
0 Kudos
Message 7 of 8
(3,191 Views)
I don't know why altenbach used a technique of negating of the raw data for the 2nd point.
Frankly, I can't find the 2nd point by my rough thinking.
Would you please why my code didn't return the point rightly? 
(Should I use the threshold arry.vi in the region of uphill?)
 
(Attachment: LV8.2.1)


메시지가 07-22-2008 06:08 AM에 labmaster에 의해 편집되었음
0 Kudos
Message 8 of 8
(2,960 Views)