
% make a movie of the axi_unsteady.m solution
% first, plot the final solution to use as a base frame for the  movie
plot(X1,T_history(:,end));
title(strvcat('Unsteady 1D Axisymetric Problem ', ...
	      ['{\Delta}t = ',num2str(delta_t)]))
% next, initialize a movie matrix big enough big enough as many frames as
% needed.  If the initial condition is included, last_timestep + 1 frames
% are required
Pipe_Movie = moviein(last_timestep + 1);
% now, make the move.  generate frames by plotting each column of T_history
% prevent the axes from being rescaled for every frame
movie_axes = axis;			% get the current axis limits
for i=1:last_timestep+1
  step = i-1; % the i.c. ocupies the first column of T_history
  plot(X1,T_history(:,i));
  title(strvcat('Unsteady 1D Axisymetric Problem ', ...
	      ['{\Delta}t = ',num2str(delta_t)]))
  axis(movie_axes) % use the axis limits of the final frame for all frames
  Pipe_Movie(:,i) = getframe;		% get a movie frame
end

movie(Pipe_Movie);			% play the movie