필터 지우기
필터 지우기

comparing many plots with their peak values

조회 수: 1 (최근 30일)
YH
YH 2020년 1월 30일
댓글: YH 2020년 1월 30일
Hey,
I have three hydrographs with different lenghts
I want to compare these hydrographs and the best way to do so is to overlay the peaks on top of each other or in other words to centralized the peak points in the x axes ( make all the peaks having the same position, lets say 0 in the x axes.
plot(biggest_hg1)
hold on
plot(biggest_hg2)
plot(biggest_hg3)
I have attached the hydroraphs as mat file.
Does some one have any idea how to do it?
Thanks alot in advanced!

채택된 답변

Mohammad Sami
Mohammad Sami 2020년 1월 30일
load('test.mat');
[~,i1] = max(biggest_hg1);
x1 = (1:length(biggest_hg1)) - i1;
[~,i2] = max(biggest_hg2);
x2 = (1:length(biggest_hg2)) - i2;
[~,i3] = max(biggest_hg3);
x3 = (1:length(biggest_hg3)) - i3;
plot(x1,biggest_hg1);
hold on;
plot(x2,biggest_hg2);
plot(x3,biggest_hg3);
  댓글 수: 1
YH
YH 2020년 1월 30일
Thank you so much, that what I was looking for!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by