@@ -147,7 +147,7 @@ Uses Ackermann's formula for SISO systems and [`place_knvd`](@ref) for MIMO syst
147
147
148
148
Please note that this function can be numerically sensitive, solving the placement problem in extended precision might be beneficial.
149
149
"""
150
- function place (A, B, p:: AbstractVector , opt= :c ; direct = false , kwargs... )
150
+ function place (A, B, p, opt= :c ; direct = false , kwargs... )
151
151
n = length (p)
152
152
n != size (A,1 ) && error (" Must specify as many poles as the state dimension" )
153
153
if opt === :c
@@ -233,14 +233,14 @@ This implementation uses "method 0" for the X-step and the QR factorization for
233
233
This function will be called automatically when [`place`](@ref) is called with a MIMO system.
234
234
235
235
# Arguments:
236
- - `init`: Determines the initialization strategy for the iterations for find the `X` matrix. Possible choices are `:id` (default) , `:rand`, `:s`.
236
+ - `init`: Determines the initialization strategy for the iterations for find the `X` matrix. Possible choices are `:id`, `:rand`, `:s` (default) .
237
237
"""
238
238
function place_knvd (A:: AbstractMatrix , B, λ; verbose= false , init= :s , method = 0 )
239
239
n, m = size (B)
240
240
T = float (promote_type (eltype (A), eltype (B)))
241
241
CT = Complex{real (T)}
242
- λ = sort (λ , by= LinearAlgebra. eigsortby)
243
- length (λ) == size (A, 1 ) == n || error (" Must specify as many poles as states " )
242
+ λ = sort (vec (λ) , by= LinearAlgebra. eigsortby)
243
+ length (λ) == size (A, 1 ) == n || error (" Must specify as many poles as the state dimension " )
244
244
Λ = diagm (λ)
245
245
QRB = qr (B)
246
246
U0, U1 = QRB. Q[:, 1 : m], QRB. Q[:, m+ 1 : end ] # TODO : check dimension
0 commit comments