def impulse(system, X0=None, T=None, N=None):
 if isinstance(system, lti):
  sys = system._as_ss()
 elif isinstance(system, dlti):
  raise AttributeError('impulse can only be used with continuous-time systems.')
 else:
  sys = lti(*system)._as_ss()
 if (X0 is None):
  X = squeeze(sys.B)
 else:
  X = squeeze((sys.B + X0))
 if (N is None):
  N = 100
 if (T is None):
  T = _default_response_times(sys.A, N)
 else:
  T = asarray(T)
 (_, h, _) = lsim(sys, 0.0, T, X, interp=False)
 return (T, h)

def impulse ( system , X0 = None , T = None , N = None ) : if isinstance ( system , lti ) : sys = system . _as_ss ( ) elif isinstance ( system , dlti ) : raise AttributeError ( 'impulse can only be used with continuous-time systems.' ) else : sys = lti ( * system ) . _as_ss ( ) if ( X0 is None ) : X = squeeze ( sys . B ) else : X = squeeze ( ( sys . B + X0 ) ) if ( N is None ) : N = 100 if ( T is None ) : T = _default_response_times ( sys . A , N ) else : T = asarray ( T ) ( _ , h , _ ) = lsim ( sys , 0.0 , T , X , interp = False ) return ( T , h )
impulse response of continuous-time system .