lsim [control]
— Function File: [y, x] = lsim (sys, u, t, x0)

Produce output for a linear simulation of a system; produces a plot for the output of the system, sys.

u is an array that contains the system's inputs. Each row in u corresponds to a different time step. Each column in u corresponds to a different input. t is an array that contains the time index of the system; t should be regularly spaced. If initial conditions are required on the system, the x0 vector should be added to the argument list.

When the lsim function is invoked a plot is not displayed; however, the data is returned in y (system output) and x (system states).