%
% clear previous plot meta file
clg
%
% access file of data to be plotted 
load data.mat
%
% read first column of data file into array x
n1i=1
n1f=101
x=data(n1i:n1f,1);
%
% read second column of data file into array y1
y1=data(n1i:n1f,2);
%
n2i=n1f+1
n2f=n2i+100
% read third column of data file into array y2
y2=data(n2i:n2f,2);
%
n3i=n2f+1
n3f=n3i+100
% read third column of data file into array y3
y3=data(n3i:n3f,2);
%
% plot x vs y in Cartesian coordinates
axis([0,300,-0.001,0.011])
axis('square')
plot(x(:,1),y1(:,1),'--',x(:,1),y2(:,1),':',x(:,1),y3(:,1),'-')
%
% label x and y axes
ylabel('y(zl,t)')
xlabel('t')
%
% add title to top of plot
title('DSS012 (-), DSS020 (.), DSS024 (solid), N = 101')
%
% save plot image in meta file figur.met
meta figur.met
pause
%
% check for meta file; ! can be used to execute a Unix command within
% Matlab
!ls *.met
%
% the meta file figur.met created by mat.m is converted to a Postscript
% file, figur.ps
!gpp figur.met -dps
%
% check for .ps file
!ls *.ps
%
% send Postscript file to ad109 Postscript printer
!op -d cs1 -q ihd109 figur.ps
%
% delete .met files
!rm *.met
%
% delete .ps files
!rm *.ps
%
% check if Postscript plotting is finished
!oq -d cs1
