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=animatedlines = [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); drawnowend
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.
Best Answer