How to use animated line
Afficher commentaires plus anciens
I want to use the animation in the piping network. this is a sample of a code:
s = [1 2 3];
t = [2 3 4];
G = graph(s,t);
h = plot(G);
The result of the figure is 

I want to an animation with this nework s that it can show creating edges from step by step like 1-->2, 2-->3 and so on. I build a code.
h=animatedline
s = [1 2 3];
t = [2 3 4];
axis([.5,3.5,-2,14])
for i=1:length(s)
g = graph(s(i),t(i));
p= plot(g);
drawnow
end
But the figure is 

i don't expect this figure. And also I don't know if the structure satisfies the animation mode or not.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Animation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!