How can I find a section of a graph?

1 回表示 (過去 30 日間)
wobbly
wobbly 2021 年 9 月 8 日
回答済み: Chunru 2021 年 9 月 9 日
I want to highlight a percentage of the maximum amplitude along the wave. What function will allow me to do this?

回答 (1 件)

Chunru
Chunru 2021 年 9 月 9 日
% plot the curve
t = 0:.1:5;
x = cos(2*pi*3*(t-2.5))./(1+(t-2.5).^2*2);
plot(t, x, 'b-');
% peak around 2.4-2.6
idx = find(t>2.4 & t<2.6);
hold on
plot(t(idx), x(idx), 'y-', 'LineWidth', 2)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by