Plotting graphs into a movie
Mostrar comentarios más antiguos
Given the following code, there is a variable "I" that is set to 0. How can I increase "I" to 2 while making it a movie. Example: Increasing "I" at 0.01 increments and as "I" increases the graph will change and that change can be shown as a movie.
function dot=fitz(t,v);
dot=zeros(2,1);
I=0;
dot(2)=0.08*(v(1)+0.7-0.8*v(2));
dot(1)=v(1)-(v(1)^3)/3-v(2)+I;
[t,v]=ode45('fitz',[0 200],[0,0]);
plot(v(:,1),v(:,2),'-');
Respuestas (1)
Walter Roberson
el 6 de Dic. de 2013
0 votos
After the plot(), add a short pause(), and then getframe(). If you aren't generating a lot of frames, then store them all and use videowriter afterwards. But if needed for storage, use videowriter as you go.
1 comentario
Yeetesh
el 6 de Dic. de 2013
Categorías
Más información sobre Animation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!