% this is file animpfplots.m (animated pressure flow plots) % It plots pressures and flows in subwindows of the graphics % It gives the index and value numbers of each point on the graph % hitting any key will proceed to the next graph % must be called after setup.m has been run for i=1:n subplot(2,1,1) plot(Time(i),Ap(i),'b.', Time(i),Vp(i),'r.', ... Time,Ap,'b-',Time,Vp,'r-'); grid on ylabel('Pressure') title(['Blue: Aortic, Red: Ventricular, index = ', num2str(i)]) axis([min(Time) max(Time) min(min(Ap), min(Vp)) max(max(Ap), max(Vp))]) subplot(2,1,2) plot(Time(i), Af(i), 'b.', Time,Af,'b-'); grid on ylabel('Flow in ml/min') xlabel('time (sec)') title(['Aortic Flow, index = ', num2str(i)]) axis([min(Time) max(Time) min(Af) max(Af)]) pause end