Skip to content

Commit

Permalink
don't balance systems with rational coefficients (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen authored Mar 15, 2022
1 parent cd46c63 commit 2b9d6f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function Base.convert(::Type{StateSpace}, G::TransferFunction{TE,<:SisoTf{T0}};
end

# Note: balancing is only applied by default for floating point types, integer systems are not balanced since that would change the type.
function Base.convert(::Type{StateSpace{TE,T}}, G::TransferFunction; balance=!(T <: Integer)) where {TE,T<:Number}
function Base.convert(::Type{StateSpace{TE,T}}, G::TransferFunction; balance=!(T <: Union{Integer, Rational})) where {TE,T<:Number}
if !isproper(G)
error("System is improper, a state-space representation is impossible")
end
Expand Down

0 comments on commit 2b9d6f0

Please sign in to comment.