Kc = 176;
tau1 = 5;
tau2 = 30;
kQ = 0.714;

Kcl = (kQ*Kc)/(1+(kQ*Kc));
tau = sqrt((tau1*tau2)/(1+(kQ*Kc)));
zeta = 0.5 * (tau1+tau2)/(sqrt(tau1*tau2)) * 1 / (sqrt(1+(kQ*Kc)));

%disp(Kcl);
%disp(tau);
%disp(zeta);

sim('twoTanks.mdl');



fig = figure(1); 
plot(time,T2,'DisplayName','\DeltaT_2')  
hold on;
plot(time,T2s,'red','LineStyle','--','DisplayName','\DeltaT_{2,set}') 
formatSpec = 'Kc = %1$d';
str = sprintf(formatSpec,Kc);
title(str)
ylabel('\DeltaT_2, \DeltaT_{2,set}')
xlabel('Time [min]')
ylim([(min([min(T2),min(T2s)])-0.05), (max([max(T2),max(T2s)])+0.05)])
hold off;
legend
formatSpec = 'PlotOfKc__%1$d';
str = sprintf(formatSpec,Kc);
%saveas(fig,str,'jpeg')












