%               ctdinit.m
%               takes input file and defines z,t,s,c
numrange=input('file number range ');
for num=numrange
numstring=int2str(num);
eval(['load  stel',numstring])
eval(['dummy=stel',numstring,';'])
t=dummy(:,2);
z=-dummy(:,1);
s=dummy(:,3);
clear dummy
g=find(z<-1);
clg
subplot(121)
plot(t(g),z(g))
xlabel('temp')
ylabel('depth')
title(['stel',numstring])
subplot(122)
plot(s(g),z(g),'b')
xlabel('sal')
title(['stel',numstring])
%     name2=int2str(code);
eval(['s',numstring,'=s;'])
eval(['t',numstring,'=t;'])
eval(['z',numstring,'=z;'])
eval(['clear s t z numstring stel',numstring])

end

