how to plot repeating steps graph real time/animated
Mostra commenti meno recenti

the picture is sideways but
Is there a way to animate this sort of graph?
so far I have:
clc, clearvars
h = animatedline;
axis([0,5*pi,0.8,1])
x = linspace(0,5*pi,5000);
y = sin(x);
posY=y(y>0.8);
posX=x(y>0.8);
for k = 1:length(x)
addpoints(h,posX(k),posY(k));
% scatter(posX(k),posY(k));
plot (posX,posY,'.');
end
this is a partial plot of a sine wave but i would like to do a partial plot of a graph like the one I've drawn. Thank you in advance.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Animation in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!