function [x,z] = get_profile(test,iplot);
%
% function to extract profile data from LIP11D data files
% 
% test = name of test (character)
% iplot
%   plot results if iplot == 1
% z    = output of bottom profile
% x    = cross-shore coordinate
%
% use [x,z] = get_profile(test,iplot);
%
% test refers to the bottom-profile data files
% a typical exmaple is '%1a003c'
% where %1a refers to the test
%        00 to hour 0
%         3 to cross-shore transect number (5 in total)
%         c to the fact that is combined sub-aquatious and dry-land
%


inst = 'profile';
eval(['cd profiles'])
[x,z] = aukmat(test,inst,0);
eval(['cd ..'])

if iplot == 1
if ~isempty(z)
plot(x,z)
axis([0 200 0 5])
xlabel('X (m)')
ylabel('z (m)')
end
end
