figure(1)
plot(time,d(:,1),'Color','blue')
hold on
ylim([29 31])
legend('d_1=T_1', 'Location','best')
xlabel('Time')
ylabel('Temperature T_1 [^oC]')

figure(2)
plot(time,d(:,2),'Color','red')
hold on
ylim([49 61])
legend('d_2=T_2', 'Location','best')
xlabel('Time')
ylabel('Temperature T_2 [^oC]')

figure(3)
%subplot(3,2,1)
plot(time, q,'Color',cherry)
hold on
ylim([9 12])
plot(time,qsp,':','Color',indigo)
legend('y_1=F','y_1^s=F^s')
xlabel('Time')
ylabel('Flowratw q [kg s^{-1}]')

figure(4)
%subplot(3,2,2)
plot(time, T,'Color',cherry)
hold on
plot(time, Tsp,':','Color',indigo)
legend('y_2=T','y_2^s=T^s', 'Location','best')
ylim([34 46])
xlabel('Time')
ylabel('Temperature T [^oC]')

figure(5)
%subplot(3,2,3)
plot(time,v(:,1),'Color','blue')
hold on
ylim([9 12])
legend('v_{01}','Location','east')
xlabel('Time')
ylabel('Tranformed input')

figure(6)
%subplot(3,2,4)
plot(time,v(:,2),'Color','red')
hold on
ylim([9 12])
legend('v_{2}','Location','east')
xlabel('Time')
ylabel('Tranformed input ')

figure(7)
%subplot(3,2,5)
plot(time,uplant(:,1),'Color','blue')
hold on
ylim([1.9 10.1])
% plot([0 time(end)],[qmin qmin], 'k--')
%plot([0 time(end)],[q1max q1max],'k--')
legend('u_1 = F_1','Location','east')
xlabel('Time')
ylabel('Flowrate F_1 [kg s^{-1}]')

figure(8)
%subplot(3,2,6)
plot(time,uplant(:,2),'Color','red')
ylim([1.9 10.1])
hold on
legend('u_2 = F_2','Location','east')
xlabel('Time')
ylabel('Flowrate F_2 [kg s^{-1}]')