Skip to content

Commit

Permalink
Merge 956cb85 into e993f7b
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Oct 7, 2020
2 parents e993f7b + 956cb85 commit 04e4164
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/timeresp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impulse(sys::LTISystem, Tf::Real; kwags...) = impulse(sys, _default_time_vector(
impulse(sys::LTISystem; kwags...) = impulse(sys, _default_time_vector(sys); kwags...)
impulse(sys::TransferFunction, t::AbstractVector; kwags...) = impulse(ss(sys), t; kwags...)

"""`y, t, x = lsim(sys, u, t; x0, method])`
"""`y, t, x = lsim(sys, u[, t]; x0, method])`
`y, t, x, uout = lsim(sys, u::Function, t; x0, method)`
Expand Down Expand Up @@ -136,6 +136,11 @@ function lsim(sys::StateSpace, u::AbstractVecOrMat, t::AbstractVector;
return y, t, x
end

function lsim(sys::StateSpace{<:Discrete}, u::AbstractVecOrMat; kwargs...)
t = range(0, length=length(u), step=sys.Ts)
lsim(sys, u, t; kwargs...)
end

@deprecate lsim(sys, u, t, x0) lsim(sys, u, t; x0=x0)
@deprecate lsim(sys, u, t, x0, method) lsim(sys, u, t; x0=x0, method=method)

Expand Down

0 comments on commit 04e4164

Please sign in to comment.