02-03-2014 01:05 PM
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.
02-03-2014 03:12 PM
Please make your front panel a reasonable size before attaching and please make sure your graphs have some typical default data.
02-03-2014 10:41 PM
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
02-04-2014 02:59 AM
Use WDT Get XY Value DBL http://zone.ni.com/reference/en-XX/help/371361K-01/lvwave/get_y_value/#parent
02-07-2014 12:46 PM
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.
02-07-2014 12:49 PM
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
02-07-2014 12:57 PM
@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
02-07-2014 01:05 PM
hi,
I have attached my vi again. The input array is actually data from an imon. I have attached the sample data here.
thanks.
02-07-2014 01:13 PM
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.
02-07-2014 01:31 PM
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.