How to get number of peaks and locs from different graphs that are plotted using a single for loop?
Show older comments
figure;
for k=1:length(x)
profile(k)=img(y(k),x(k));
plot(profile,'r-','LineWidth',2);
grid on;
ylim([0 2]);
end
This code giving me different plots. For each of the plot I am getting different peaks. How can individually calculate no of peaks and locs for each of the plot?
Answers (1)
KSSV
on 16 Jul 2018
0 votes
Have a look on functions max and findpeaks.
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!