Skip to content

Commit 5abb72f

Browse files
authored
Merge pull request #637 from JuliaControl/safefreqresp
protect `freqresp` against loading GenericLinearAlgebra
2 parents bb229ff + f5ecd73 commit 5abb72f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/freqresp.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ _freq(w, te::Discrete) = cis(w*te.Ts)
4242
if sys.nx == 0 # Only D-matrix
4343
return PermutedDimsArray(repeat(T.(sys.D), 1, 1, length(w_vec)), (3,1,2))
4444
end
45-
local F
45+
local F, Q
4646
try
4747
F = hessenberg(sys.A)
48+
Q = Matrix(F.Q)
4849
catch e
4950
# For matrix types that do not have a hessenberg implementation, we call the standard version of freqresp.
5051
e isa MethodError && return freqresp_nohess(sys, w_vec)
5152
rethrow()
5253
end
53-
Q = Matrix(F.Q)
5454
A = F.H
5555
C = sys.C*Q
5656
B = Q\sys.B

0 commit comments

Comments
 (0)