Skip to content

Commit a3fb173

Browse files
committed
restrict p in place to abstract vector for better error message
1 parent d8e39fa commit a3fb173

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ControlSystemsBase/src/synthesis.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ Uses Ackermann's formula for SISO systems and [`place_knvd`](@ref) for MIMO syst
147147
148148
Please note that this function can be numerically sensitive, solving the placement problem in extended precision might be beneficial.
149149
"""
150-
function place(A, B, p, opt=:c; direct = false, kwargs...)
150+
function place(A, B, p::AbstractVector, opt=:c; direct = false, kwargs...)
151151
n = length(p)
152-
n != size(A,1) && error("Must specify as many poles as states")
152+
n != size(A,1) && error("Must specify as many poles as the state dimension")
153153
if opt === :c
154154
direct && error("direct = true only applies to observer design")
155155
n != size(B,1) && error("A and B must have same number of rows")

0 commit comments

Comments
 (0)