how to find out full width at half maximum from this graph
Show older comments

3 Comments
John D'Errico
on 1 Nov 2016
Edited: John D'Errico
on 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
on 1 Nov 2016
Edited: parry sharma
on 1 Nov 2016
Image Analyst
on 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.
Accepted Answer
More Answers (2)
It should be "more or equal" for the first index: index1 = find(data >= halfMax, 1, 'first');
3 Comments
Image Analyst
on 24 Aug 2018
You're right. Thanks for catching that. I've edited my answer to fix it.
Muhammad Basit
on 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
on 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
on 29 Dec 2021
0 votes
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 Comment
Image Analyst
on 29 Dec 2021
The data the poster showed has about 1200 sample points across it.
Categories
Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

