%
% clear previous plot
clg
%
% load output from Fortran program for plot of solution
load m3.out;
%
% number of t and x values in file m3.out
nt=11;
nx=101;
%
% store x
for i=1:nx;
   xp(i)=m3(i,1);
end;
%
% store solution as a function of x and t for front flattening
for j=1:nt;
for i=1:nx;
    up1(i,j)=m3((j-1)*nx+i,2);
end;
end;
%
% plot solution
figure(1);
plot(xp,up1,'-')
hold on;
%
% label axes
xlabel(' x');
ylabel(' u(x,t)');
title(' Front Flattening')
%
% .ps or .eps output file
%print output.ps
%print m3p1a.eps -deps 
%print m3p2a.eps -deps 
%print m3p3a.eps -deps 
%
% store solution as a function of x and t for front sharpening; nt+2
% required for NCASE = 2, run no. 1
%for j=1:nt+2;
for j=1:nt;
for i=1:nx;
    up2(i,j)=m3(nx*nt+(j-1)*nx+i,2);
end;
end;
%
% plot solution
figure(2);
plot(xp,up2,'-')
hold on;
%
% label axes
xlabel(' x');
ylabel(' u(x,t)');
title(' Front Sharpening')
%
% .ps or .eps output file
%print output.ps -append
%print m3p1b.eps -deps 
%print m3p2b.eps -deps 
%print m3p3b.eps -deps 
%
% send .ps or .eps to ihb103 Postscript printer
%!op -d cs1 -q ihb103 m3p1a.eps
%!op -d cs1 -q ihb103 m3p1b.eps
%!op -d cs1 -q ihb103 m3p2a.eps
%!op -d cs1 -q ihb103 m3p2b.eps
%!op -d cs1 -q ihb103 m3p3a.eps
%!op -d cs1 -q ihb103 m3p3b.eps
%printfile output.ps
