How to find local maximums from this graph?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. I am working with border irregularity. For this,I have found this curve and divided the curve into 8 regions by using this code.
plot(distance)
I=imgaussfilt(distance,20);
figure
plot(I)
n = 8 ;
d=I';
a=length(I);
% check whether data needed to be appended to reshape into n
b = n * ceil(a / n)-a ;
%
d = [d NaN(1,b)] ;
iwant = reshape(d,[],n);
% plot
figure
plot(iwant','b*')
Where iwant' is a matrix of 8 by 497. plot of I and iwant' are given respectively:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/330719/image.bmp)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/330722/image.bmp)
Here 1st 1/8 portion of the curve is in x=1 position then second 1/8 in x=2 etc.How can I find out the local maximums from iwant' and count them?
2 Kommentare
madhan ravi
am 12 Jul. 2020
Bearbeitet: madhan ravi
am 12 Jul. 2020
Have you looked at islocalmax() ?
Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!