필터 지우기
필터 지우기

match peaks from plot

조회 수: 3 (최근 30일)
Jes
Jes 2022년 6월 12일
댓글: Jeffrey Clark 2022년 6월 13일
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
Jes
Jes 2022년 6월 13일
@Jeffrey Clark i couldnt get you clearly. Could you exlain a bit more? did you mean by using islocalmax I could reduce the amount of data?
Jeffrey Clark
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개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by