When I compare the gain margin returned by the MARGIN command to that shown in the Bode plot produced by the same command, I notice that they are not the same.
The gain margin Gm returned by the MARGIN command:
[Gm,Pm,Wg,Wp] = margin(sys)
is unitless. The gain margin shown in the bode plot produced by the command:
margin(sys)
has units of dB.
Best Answer