Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ControlSystemsBase/src/types/StateSpace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ function Base.Broadcast.broadcasted(::typeof(*), M::AbstractArray{<:Number}, sys
sminreal(basetype(ST)(Ae, Be, Ce, De, sys1.timeevol))
end

function *(sys1::ST, D::Diagonal) where {ST <: AbstractStateSpace}
if issiso(sys1) # This is a special case that falls back on broadcasting
function *(sys1::AbstractStateSpace, D::AbstractMatrix)
if issiso(sys1) && isdiag(D) # This is a special case that falls back on broadcasting
return sys1 .* D
else # This is the standard implementation but must be handled here since we special case diagonal matrices for the case above
sys1 * ss(D, sys1.timeevol)
Expand Down
Loading