% Function for calculating the Ms value
% witen by: Chriss Grimholt 11 jan. 2012

function ms = ms(gp, gc)

ms = max(abs(freqresp(feedback(1,gp*gc),logspace(-4,4,40000))));

return