def step2(system, X0=None, T=None, N=None, **kwargs):
 if isinstance(system, lti):
  sys = system._as_ss()
 elif isinstance(system, dlti):
  raise AttributeError('step2 can only be used with continuous-time systems.')
 else:
  sys = lti(*system)._as_ss()
 if (N is None):
  N = 100
 if (T is None):
  T = _default_response_times(sys.A, N)
 else:
  T = asarray(T)
 U = ones(T.shape, sys.A.dtype)
 vals = lsim2(sys, U, T, X0=X0, **kwargs)
 return (vals[0], vals[1])

def step2 ( system , X0 = None , T = None , N = None , ** kwargs ) : if isinstance ( system , lti ) : sys = system . _as_ss ( ) elif isinstance ( system , dlti ) : raise AttributeError ( 'step2 can only be used with continuous-time systems.' ) else : sys = lti ( * system ) . _as_ss ( ) if ( N is None ) : N = 100 if ( T is None ) : T = _default_response_times ( sys . A , N ) else : T = asarray ( T ) U = ones ( T . shape , sys . A . dtype ) vals = lsim2 ( sys , U , T , X0 = X0 , ** kwargs ) return ( vals [ 0 ] , vals [ 1 ] )
step response of continuous-time system .