find peaks of excel graph
10 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
I'm having some trouble with finding the peak coordinates of my excel data. The data has x and y values which i graphed, but i used findpeaks(data) and that did not work. I'm trying to have those peaks labeled as well if that is possible. Any help/suggestions are welcomes. Thank you
here is the graphs
here is what my code looks like
% graph
filename = 'HDPE-WAXS.xlsx';
which -all xlsread
DATA1 = readtable('HDPE-WAXS.xlsx');
%dintensity vs 2theta
intens = DATA1{:,2}; % intensity
twotheta = DATA1{:,4}; % 2theta
%plot of xrd hdpe
figure(1)
plot(twotheta,intens,'r')
xlabel('2theta (deg)')
ylabel('intensity (couts/sec)')
title('WAXS-XRD of HDPE')
2 个评论
AH
2024-4-18
You may want to try different options such as NPeaks, MinPeakHeight, ...
If you upload your data, we can provide you with a working syntax.
Voss
2024-4-18
"i used findpeaks(data) and that did not work"
Do you mean findpeaks(intens)? If that didn't work, you may need to adjust the parameters you specify in the findpeaks call:
For more specific help/suggestions, please upload the xlsx file using the paperclip button.
回答(1 个)
Cris LaPierre
2024-4-18
I recommend using the Find Local Extrema live task in a live script. It is an interactive way to determine the appropriate settings for the detecting peaks in your specific data set.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!