clear all
clc
gen_data
%%%%%%%%%%%%%%%%%%%%%%%%%%%
sim('Q_indre_P2_ytre')
%%%%%%%%%%%%%%%%%%%%%%%%%%%
subplot(3,1,1)
plot(tout,P2)
ylabel('P_2 [bar]')
grid on
axis tight
subplot(3,1,2)
plot(tout,Q)
ylabel('Q [m^3/s]')
axis tight
grid

subplot(3,1,3)
plot(tout,z)
ylabel('z [-]')
xlabel('tid [s]')
axis tight
grid
% g=gcf;
% set(g,'PaperUnits','centimeters','PaperType','A4')
% opts = struct('FontMode','fixed','FontSize',9,'width',15);
% exportfig(g,'Q_indre_P2_ytre.eps',opts)
% previewfig(g,opts)

% tid_ss=8500; %tid ved ss
% index=find(abs(tout-tid_ss)==min(abs(tout-tid_ss)));
% disp('Steady State :')
% P2_ss=P2(index);





