def simulate_impulse_response(sys, t=None):
    '\n    Compute the linear model response to an Dirac delta pulse (or all-zeros\n    array except the first sample being 1/dt at each channel) sampled at given\n    time instances.\n\n    If the time array is omitted then a time sequence is generated based on\n    the poles of the model.\n\n    Parameters\n    ----------\n    sys : {State, Transfer}\n        The system model to be simulated\n    t : array_like\n        The real-valued sequence to be used for the evolution of the system.\n        The values should be equally spaced otherwise an error is raised. For\n        discrete time models increments different than the sampling period also\n        raises an error. On the other hand for discrete models this can be\n        omitted and a time sequence will be generated automatically.\n\n    Returns\n    -------\n    yout : ndarray\n        The resulting response array. The array is 1D if sys is SISO and\n        has p columns if sys has p outputs. If there are also m inputs the\n        array is 3D array with the shape (<num of samples>, p, m)\n    tout : ndarray\n        The time sequence used in the simulation. If the parameter t is not\n        None then a copy of t is given.\n\n    '
    _check_for_state_or_transfer(sys)
    try:
        _check_for_state(sys)
    except ValueError:
        sys = transfer_to_state(sys)
    if (t is None):
        (tf, ts) = _compute_tfinal_and_dt(sys, is_step=False)
        t = np.arange(0, (tf + ts), ts, dtype=float)
    else:
        (t, ts) = _check_custom_time_input(t)
    m = sys.shape[1]
    u = np.zeros([len(t), m], dtype=float)
    u[0] = (1.0 / ts)
    return simulate_linear_system(sys, u=u, t=t, per_channel=1)
Compute the linear model response to an Dirac delta pulse (or all-zeros
array except the first sample being 1/dt at each channel) sampled at given
time instances.

If the time array is omitted then a time sequence is generated based on
the poles of the model.

Parameters
----------
sys : {State, Transfer}
    The system model to be simulated
t : array_like
    The real-valued sequence to be used for the evolution of the system.
    The values should be equally spaced otherwise an error is raised. For
    discrete time models increments different than the sampling period also
    raises an error. On the other hand for discrete models this can be
    omitted and a time sequence will be generated automatically.

Returns
-------
yout : ndarray
    The resulting response array. The array is 1D if sys is SISO and
    has p columns if sys has p outputs. If there are also m inputs the
    array is 3D array with the shape (<num of samples>, p, m)
tout : ndarray
    The time sequence used in the simulation. If the parameter t is not
    None then a copy of t is given.
def simulate_impulse_response(sys, t=None):
    '\n    Compute the linear model response to an Dirac delta pulse (or all-zeros\n    array except the first sample being 1/dt at each channel) sampled at given\n    time instances.\n\n    If the time array is omitted then a time sequence is generated based on\n    the poles of the model.\n\n    Parameters\n    ----------\n    sys : {State, Transfer}\n        The system model to be simulated\n    t : array_like\n        The real-valued sequence to be used for the evolution of the system.\n        The values should be equally spaced otherwise an error is raised. For\n        discrete time models increments different than the sampling period also\n        raises an error. On the other hand for discrete models this can be\n        omitted and a time sequence will be generated automatically.\n\n    Returns\n    -------\n    yout : ndarray\n        The resulting response array. The array is 1D if sys is SISO and\n        has p columns if sys has p outputs. If there are also m inputs the\n        array is 3D array with the shape (<num of samples>, p, m)\n    tout : ndarray\n        The time sequence used in the simulation. If the parameter t is not\n        None then a copy of t is given.\n\n    '
    _check_for_state_or_transfer(sys)
    try:
        _check_for_state(sys)
    except ValueError:
        sys = transfer_to_state(sys)
    if (t is None):
        (tf, ts) = _compute_tfinal_and_dt(sys, is_step=False)
        t = np.arange(0, (tf + ts), ts, dtype=float)
    else:
        (t, ts) = _check_custom_time_input(t)
    m = sys.shape[1]
    u = np.zeros([len(t), m], dtype=float)
    u[0] = (1.0 / ts)
    return simulate_linear_system(sys, u=u, t=t, per_channel=1)