I'll do my best to explain my problem. I am simulating the dynamics of a network and I'd like to get an animation where each frame represents my network with a specific color for each node with respect to an input file. Here my script
for ii=1:Movie_size
hfig=figure('visible','off');
hold on;
%plot edges
for kk=1:Nedge,
plot(xedge(kk,:),yedge(kk,:),'black')
end
%color of the nodes
for kk=1:nodes,
val=(1-(Color_node(12798 ,kk)-umin)/(umax-umin));
ggCol(kk,:)=[1,val,1-val];
end
%enhanced the contrast of the figure
ggCol = imadjust(ggCol,[.2 .3 0; .6 .7 1],[]);
%plot nodes
for kk=1:nodes,
plot(xpos(kk),ypos(kk),'o','MarkerFaceColor',ggCol(kk,:), ...
'MarkerEdgeColor','k','MarkerSize',10)
end
frames(ii)=getframe(hfig);
hold off;
end
movie(frames);
I succeeded in plotting each frame but when I want to get the animation, I have all the figures being displayed and no movie. I tried a lot of different things but it never works...
PS : I have been editing the title since the topic seems to have been already asked...