clc
clear all

load Data1
t1 = Data1 (:,1);
r1 = Data1 (:,2);
y11 = Data1 (:,3);
y12 = Data1 (:,4);

load Data2
t2 = Data2 (:,1);
r2 = Data2 (:,2);
y21 = Data2 (:,3);
y22 = Data2 (:,4);

%%
figure(1)
clf
subplot (3,1,1);
plot(t1,r1,'r','LineWidth',2);
ylabel('Z');  %Valve opening [Z]
xlim ([0 650]);
title('Open loop response');
grid on

subplot (3,1,2);
plot(t1,y11,'k','LineWidth',2);
ylabel('Pressure');  %Top Pressure[Kpa]
xlim ([0 650]);
grid on

subplot (3,1,3);
plot(t1,y12,'b','LineWidth',2);
xlabel('time(sec)');
ylabel('Density');  %Outflow density [kg/sec]
grid on
xlim ([0 650]);


%%
figure(2)
subplot (3,1,1);
plot(t2,r2,'r','LineWidth',2);
ylabel('Z');  %Valve opening [Z]
xlim ([0 650]);
title('Open loop response');
grid on

subplot (3,1,2);
plot(t2,y21,'k','LineWidth',2);
ylabel('Pressure');  %Top Pressure[Kpa]
xlim ([0 650]);
grid on

subplot (3,1,3);
plot(t2,y22,'b','LineWidth',2);
xlabel('time(sec)');
ylabel('Density');  %Outflow density [kg/sec]
grid on
xlim ([0 650]);


