Peak analysis of spectrum
23 views (last 30 days)
Show older comments
Hi, I have an emission spectrum of experimental data (attached graph). I have overlaid one emission line which should match a peak from the spectrum. I have many emission lines to add.
Is there a method on MATLAB for finding a peak that is in a defined proximity of an overlaid emission line and once found, calculate the wavelength width of this peak.
Thanks
0 Comments
Answers (2)
Star Strider
on 5 Apr 2017
Consider using the Signal Processing Toolbox findpeaks function to locate the peak amplitudes and frequencies.
2 Comments
Star Strider
on 6 Apr 2017
If you have the ‘specified wavelengths’ as a vector, subtract the frequency (locations) vector returned by findpeaks from the reference vector to calculate the deviation (or preferably absolute deviation) and then use some threshold to determine if the deviations are appropriate. The vectors should be the same size. (Otherwise, you can use the bsxfun function with the @minus function, but that will necessarily be more difficult.)
I’m not certain what you want to do from your description, so that’s my best guess as to how to approach it.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!