Plotting Stem Plots with animatedline

4 visualizzazioni (ultimi 30 giorni)
Jay P.
Jay P. il 14 Ott 2022
Risposto: KSSV il 14 Ott 2022
I can use animatedline to plot linear graphs. Fine. But how do I use animatedline to plot stem plots?

Risposte (1)

KSSV
KSSV il 14 Ott 2022
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

Categorie

Scopri di più su Programming in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by