Skip to content

Commit cd76d92

Browse files
committed
better error messages
1 parent c10fe6b commit cd76d92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ControlSystemsBase/src/root_locus.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ControlSystemsBase.RootLocusResult
44

55

66
function getpoles(G, K::Number; tol = 1e-2, initial_stepsize = 1e-3, kwargs...)
7-
issiso(G) || error("root locus only supports SISO systems")
7+
issiso(G) || error("root locus with scalar gain only supports SISO systems, did you intend to pass a feedback gain matrix `K`?")
88
G isa TransferFunction || (G = tf(G))
99
P = numpoly(G)[]
1010
Q = denpoly(G)[]
@@ -102,7 +102,7 @@ end
102102

103103

104104
function getpoles(G, K::AbstractVector{T}) where {T<:Number}
105-
issiso(G) || error("root locus only supports SISO systems")
105+
issiso(G) || error("root locus with scalar gain only supports SISO systems, did you intend to pass a feedback gain matrix `K`?")
106106
G isa TransferFunction || (G = tf(G))
107107
P, Q = numpoly(G)[], denpoly(G)[]
108108
poleout = Matrix{ComplexF64}(undef, Polynomials.degree(Q), length(K))

0 commit comments

Comments
 (0)