clear all
close all

load zb.dat


cd ..\..

load profs_2

ic=make_icol_scheme;

dx=2;

    load(['start.dep'])

    nst = start(1,:);

    load(['final.dep'])

    nfin = final(1,:);

    
    lf=length(nst);
    lf2=length(nfin);
    
%         subplot(5,1,i)
        figure(1)
        
        
        xx=([1:lf]-1)*dx;

        xx2=([1:lf2]-1)*dx;
        
pp=plot(xx,nst,'color',ic(:,1));

            set(pp,'Linewidth',2)

            hold on

            pp=plot(xx2,nfin,'color',ic(:,2));

            set(pp,'Linewidth',2)
            
%         end

        pp=plot(prof(5).x2,flipud(prof(5).z2),'color',ic(:,2+1));

        set(pp,'Linewidth',2)
        
        
%         add formating
         xlabel('Cross-shore distance (m)');ylabel('Elevation (m)');%title(['wave condition ' num2str(ii) ' iter ' num2str(i) '/' num2str(nt)]);

        grid on 
        box on



        % leg={'Initial','Final'};
        leg={'Initial','XBeach','Final'};

        legend(leg,2)

%             % set limits
%         yl1=-6 ;
%         yl2=8;
% 
%         xx=repres(i).x;
%         nst=repres(i).z;
%         
%         
%         inds=find(nst>yl1 & nst < yl2);
% 
%         xl1=min(xx(inds));
%         xl2=max(xx(inds));
%         axis([xl1 xl2 yl1 yl2])
% 
%         plot([xl1 xl2],[2 2],'k')
