

domain = 0:0.1:10;

s = tf('s')

gp = 1/(8*s+1)*exp(-s);

D = .35;
I = .11;
ms_sol=[];
 
for n = 1:length(domain)
    k=domain(n);
    gc = k*((1-I-D)+I/s+D*s);
    ms_sol(n,1)=ms(gp,gc);
    fprintf('k: %.2f, ms: %.3f\n',k,ms_sol(end))
    bode(1 /(1+gc*gp))
    
end
%%
figure(1)
plot(domain,ms_sol)
axis([0 10 1 1.5])