Hello I am going to develop an unsteady diffusion calculation in Mathematica, because. Because it is unsteady, I would like to visualize the solution each time step (or in some time steps). My MATLAB skills are much better than Mathematica, so II am going to give the example from there. I looked at some of the posts about that, but they were for small number of time steps like 10, or saving each plot and creating a movie. But in MATLAB I can do
surf(x,z,U_sol)
F=getframe;
xx
and zz
are the position vectors and U_solU_sol
is the solution matrix. GetFrameGetFrame
simply preserves frame but not the plot, so it looks like a continuous plotsplotting, like a movie.
On top of thatIn Matlab, you can do something like this to save the movie directly. This is before time steps
fid=figure;
pos=get(fid,'position');
writerObj=VideoWriter('sol.avi');
writerObj.FrameRate=10;
open(writerObj);
and inside the time loop
PLOT...
frame=getframe(gcf);
writeVideo(writerObj,frame)
and at the end of the time loop.
close (writerObj)
and you will have the movie file without dealing with each frame. There should be some equivalent version in Mathematica. Thank you for the help.
and Happy New Year :)
Erdem