how to find out full width at half maximum from this graph
Ältere Kommentare anzeigen

3 Kommentare
John D'Errico
am 1 Nov. 2016
Bearbeitet: John D'Errico
am 1 Nov. 2016
This is not even a MATLAB question. Not even close to the point where you can consider writing code, because you need to make many decisions, answer many questions.
What value is the maximum here? You cannot compute a half-max until you know what is the max. And you would also seem to need to know the min, as the half-max would be midway.
How can you compute the max of a relationship that seems to be trending upwards at each end, with no upper limit?
Do you intend to do smoothing? It would seem that otherwise, any such computation would be highly inaccurate. Lots of ways to do smoothing.
Once you have a curve that you are happy is smooth (or not if you do no smoothing) and you have decided what value for y is the half-max, then you compute the locations of those points on the curves by interpolation. Linear interpolation will surely suffice here, given how noisy is the data. But you have a long way to go before you start worrying about that.
parry sharma
am 1 Nov. 2016
Bearbeitet: parry sharma
am 1 Nov. 2016
Image Analyst
am 1 Nov. 2016
OK, I've modified my answer below to take into account that your FWHM value is not based on the max but based on being between the min and the max.
Akzeptierte Antwort
Weitere Antworten (2)
It should be "more or equal" for the first index: index1 = find(data >= halfMax, 1, 'first');
3 Kommentare
Image Analyst
am 24 Aug. 2018
You're right. Thanks for catching that. I've edited my answer to fix it.
Muhammad Basit
am 9 Jul. 2021
Hi, Could you please tell me whether the signs of >= should be on both indexes or for index2 it should be <=. Using your code, I'm not being able to find the correct answers.
Image Analyst
am 11 Jul. 2021
@Muhammad Basit, I don't understand what you're asking. What sign? The code is the way it should be. If it doesn't work for your data, then give us your data and we'll fix it.
Xiaomeng Gao
am 29 Dez. 2021
0 Stimmen
This would be limited by available sample points. For example, if major peak has only 3 sample points, but it's neighboring peak is above half of max, then the neighbouring peak can be mistaken as first point that cross half max, potentially widening the width.
1 Kommentar
Image Analyst
am 29 Dez. 2021
The data the poster showed has about 1200 sample points across it.
Kategorien
Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


