GPMargin:

-------------------------------------------------------------------------------
   Computes gain and phase margins.
-------------------------------------------------------------------------------
   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)         

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

Children: