Find peak values in XRD spectra
12 views (last 30 days)
Show older comments
I am new to MATLAB and trying to figure out how I can find the peak values for a given sample XRD spectra. I have attached the sample spectra data. Here is the code I have right now that displays the data:
data = importdata('test.txt') ; % load the data from text file
data1=semilogy(data(:,1),data(:,2)) ; % plot the data
This is what gets displayed:

I am trying to figure out how I can get the peak values in a matrix or some sort so that I can compute further analysis. My overall goal is to compute the standard deviation of these peak values...so if there is a shortcut to that , that would be even better. Thank you!
0 Comments
Accepted Answer
Image Analyst
on 7 Dec 2018
Try findpeaks() in the Signal Processing Toolbox. You might have to adjust the peak prominence input argument.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!