Find peak values in XRD spectra

12 views (last 30 days)
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:Screen Shot 2018-12-07 at 1.40.12 AM.png
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!

Accepted Answer

Image Analyst
Image Analyst on 7 Dec 2018
Try findpeaks() in the Signal Processing Toolbox. You might have to adjust the peak prominence input argument.

More Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!