How can I get the maximum difference in the specific range?
古いコメントを表示
I am trying to find the value of the maximum difference of the wave, but I would like to eliminate some part of the graph.
In this case, I would like to delete the range from 0.0 to 0.5 and get the maximum value from 0.5 to 3.
I have no idea how to execute the above process.
t = 0:1/1000:3;
q1 = sin(2*pi*7*t).*exp(-t/2);
plot(t,q1)
[up,lo] = envelope(q1,100,'analytic');
hold on
plot(t,up,'-',t,lo,'--')
hold off
envelope(q1,300)
maxDiff = peak2peak(up-lo);
disp(maxDiff)
4 件のコメント
KSSV
2019 年 5 月 8 日
From what you want to delete the range from 0.0 to 0.5 ?
horizon
2019 年 5 月 8 日
Walter Roberson
2019 年 5 月 8 日
data(data >= 0 & data <= 0.5) = [];
horizon
2019 年 5 月 8 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Calendar についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!