GPMargin:

Path: Common/Control

% Computes gain and phase margins from magnitude and phase.

--------------------------------------------------------------------------
   Form:
   [gM, wG, pM, wP] = GPMargin( m, p, w )
   [gM, wG, pM, wP] = GPMargin( g, w )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   m                 Gain (db) or complex transfer function
   p                 Phase (deg)
   w                 Frequency vector

   -------
   Outputs
   -------
   gM                Gain margin (dB)
   wG                Frequencies of gain crossovers (rad/sec)
   pM                Phase margins (deg)
   wP                Frequencies of phase crossovers   (rad/sec)         

--------------------------------------------------------------------------

Back to the Common Module page