figure subplot(2,1,1) plot(squeeze(meanw(Ny/2,Nx/2,1:length(mdep))),(mdep),'o-'); set(gca,'YLim',[mdep(length(mdep)) 0]); xlabel('time mean w m/s') ylabel('depth m') grid anchor1=meanw(Nx/2,Ny/2,Nz/2); text((anchor1*0.9),mdep(Nz/2),num2str(anchor1)); %anchor2=eval(it); %text((anchor1*0.9),mdep(round(3*Nz/4)),['timestep ' num2str(anchor2)] ); subplot(2,1,2) for i=1:length(mdep) hold on;plot(squeeze(meanw(:,Nx/2,i)),':'); end plot(squeeze(meanw(:,Nx/2,2)),'--'); plot(squeeze(mean =w(:,Nx/2,Nz/2)),'-'); set(gca,'XLim',[0 Nx]); grid on ylabel('time mean w m/s') xlabel('distance across the domain (gridpoints)') subplot(2,1,1) title(descriptor)