%% Header
% Purpose:  Calculating M_s-value from controller tuning
% Author:   Axel Lodemel Holene 
% E-mail:   axel.holene@gmail.com
% Date:     13. February 2013
% About:    

function Ms = Ms(ctrl, parm)
    G  = parm.G ;
    C  = controller(ctrl, parm) ;
    Ms = max(abs(freqresp(1/(1 + G.tf*C.tf),...
         logspace(-4,4,40000)))) ;
end