The method of how to calculate the FWHM.
23 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
cheng wei
el 11 de Dic. de 2024 a las 5:20
Respondida: Star Strider
el 11 de Dic. de 2024 a las 16:29
I have searched extensively on this website and the internet, but all the methods for calculating the FWHM (Full Width at Half Maximum) seem overly complex. I was wondering: can we simplify this by using a cut_index on the X-axis to determine the corresponding Y-axis values?
My idea is that we could compute the FWHM using the formula:
FWHM=(max_Y_value - min_Y_value)/2
and display the result accordingly in the window.
BTW, my sample is just a very simple Gaussian curve.
Would this approach be possible or effective? I’d like to discuss this idea further with the community. Thank you!
0 comentarios
Respuestas (2)
Star Strider
el 11 de Dic. de 2024 a las 16:29
A different approach —
x = linspace(0, 10);
y = exp(-(x-5).^2*0.25);
ymin = min(y)
[ymax,idx] = max(y - ymin)
halfmax = ymax/2;
for k = 1:2
idxrng = (1:idx) + idx*(k-1);
xhalf(k) = interp1(y(idxrng), x(idxrng), halfmax + ymin);
end
xhalf
FWHM = diff(xhalf)
figure
plot(x, y)
hold on
plot(xhalf, [1 1]*(halfmax+ymin), 'rs')
hold off
grid
text(mean(xhalf), (halfmax+ymin), sprintf('\\leftarrow FWHM = %.3f \\rightarrow', FWHM), 'Horiz','center')
.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!