match peaks from plot
3 ビュー (過去 30 日間)
古いコメントを表示
v = hz1.Vdeg;
l = length(v);
t = 1:l(end);
plot(t,v);
[vmax,vindmax]=findpeaks(v,t);
[vmin,vindmin]=findpeaks(-v,t);
hold on
plot(vindmax,vmax,'o','MarkerFaceColor','r','MarkerSize',5);
plot(vindmin,-vmin,'d','MarkerFaceColor','g','MarkerSize',5);
figure
s = hz1.Dmm;
l = length(s);
t = 1:l(end);
plot(t,s);
[smax,sindmax]=findpeaks(s,t);
[smin,sindmin]=findpeaks(-s,t);
hold on
plot(sindmax,smax,'o','MarkerFaceColor','r','MarkerSize',5);
plot(sindmin,-smin,'d','MarkerFaceColor','g','MarkerSize',5);


I have these 2 peaks . how do I match the peaks from these two together ?
5 件のコメント
Jeffrey Clark
2022 年 6 月 13 日
@Jes, yes. Look at the last figure on that documentation page, I suspect that method will work for you to give a reasonable number of peaks.
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!