LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to find x axis value corresponding to a given y axis value in a graph

hi all,

 I have a gaph that has a 2d array of power intensity on its y axis and wavelengh on x axis. I need to find the x axis value corresponding to the maximum peak of the graph. I have found the value of y axis(named max value in vi) corresponding to the maximum peak but I am not able to find the corresponding  x axis value. Can anyone please tell me how to find that. My vi is attached here.

0 Kudos
Message 1 of 14
(6,679 Views)

Please make your front panel a reasonable size before attaching and please make sure your graphs have some typical default data.

Message 2 of 14
(6,655 Views)

Hi shivy92,

 

By looking at your VI, I guess you use Array Max & Min VI to find the maximum peak of the graph. Within that function there is an output node call "max index(es)" where it will give you a location of the maximum value.

From there you can use that index value to get the X axis value you have mentioned.

 

Hope this help

 

Best regards,

TuiTui

0 Kudos
Message 3 of 14
(6,602 Views)

Use WDT Get XY Value DBL http://zone.ni.com/reference/en-XX/help/371361K-01/lvwave/get_y_value/#parent


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 14
(6,568 Views)

I tried doing it that way. I made the max index as the input to an interolate array with x axis values, I got a value but it s not right, infact it is nowhere close to the required value. Is there any way I could use the peak detector to find the x axis value corresponding to the maximum peak?

Thanks.

regards.

0 Kudos
Message 5 of 14
(6,497 Views)

I tried using WDT get XY value too, but the problem here is that it only takes analog waveform as an input. It is not accepting my XY graph as an input. Is there any way I could use my XY graph as waveform in node??

Thanks.

regards

 

0 Kudos
Message 6 of 14
(6,492 Views)

@shivy92 wrote:

I tried doing it that way. I made the max index as the input to an interolate array with x axis values, I got a value but it s not right, infact it is nowhere close to the required value. Is there any way I could use the peak detector to find the x axis value corresponding to the maximum peak?

Thanks.

regards.


Interpolate array? Index array!

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 7 of 14
(6,488 Views)

hi,

I have attached my vi again. The input array is actually data from an imon. I have attached the sample data here.

thanks.

0 Kudos
Message 8 of 14
(6,486 Views)

I have tried both index and interpolate array, but i am getting the same wrong answer.I am wondering if there is any other way of finding the x axis value for maximum peak.

thanks.

0 Kudos
Message 9 of 14
(6,478 Views)

We don't have your image drivers. Please run the VI until the image data array has real data. Stop the VI. Right-click the array and "make current value default". delete all the imaging and file IO stuff, save the VI under a new name, and attach it here.

0 Kudos
Message 10 of 14
(6,468 Views)