 fnm = cellstr(ls('*.txt'));

for k = 1:length(fnm)
[pathstr, name, ext] = fileparts(fnm{k});
x= textread(fnm{k});
figure
plot(x(:,2),x(:,1).*-1,'r')
grid on
axis([1485 1515 -25 0])
xlabel('velocity (m/s)')
ylabel ('pressure (dbars)')
title (name)
saveas(gcf,name,'png')
end

% plots svp profiles for csv files with no headers and velocity and
% pressure columns. Put in dir with .csv files and run.