Plotting Stem Plots with animatedline

I can use animatedline to plot linear graphs. Fine. But how do I use animatedline to plot stem plots?

回答 (1 件)

KSSV
KSSV 2022 年 10 月 14 日

1 投票

x = linspace(0,4*pi,1000);
y = sin(x);
for i = 1:length(x)
stem(x(1:i),y(1:i))
axis([min(x) max(x) min(y) max(y)])
drawnow
end

カテゴリ

ヘルプ センター および File ExchangeAnimation についてさらに検索

製品

リリース

R2022b

質問済み:

2022 年 10 月 14 日

回答済み:

2022 年 10 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by