From a27ffc9b44923a9be48b15580c1fee314c387080 Mon Sep 17 00:00:00 2001 From: DSVarga Date: Tue, 25 May 2021 15:31:50 +0200 Subject: [PATCH] Minor fix in lseval. --- .github/workflows/CI.yml | 6 +----- Project.toml | 2 +- ReleaseNotes.md | 4 ++++ src/lstools.jl | 4 ++-- src/rmtools.jl | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 59620d1..be425e8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,11 +15,7 @@ jobs: fail-fast: false matrix: version: - - '1.2' - - '1.3' - - '1.4' - - '1.5' - - '1.6' + - '1' - 'nightly' os: [ubuntu-latest] arch: diff --git a/Project.toml b/Project.toml index 8d4cc96..f69d680 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MatrixPencils" uuid = "48965c70-4690-11ea-1f13-43a2532b2fa8" authors = ["Andreas Varga "] -version = "1.6.4" +version = "1.6.5" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" diff --git a/ReleaseNotes.md b/ReleaseNotes.md index dca7f4c..45da610 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,9 @@ # Release Notes +## Version 1.6.5 + +This patch version fixes a bug in the function lseval. + ## Version 1.6.4 This patch version fixes a bug in the function eigselect2. diff --git a/src/lstools.jl b/src/lstools.jl index 56dacdc..a711554 100644 --- a/src/lstools.jl +++ b/src/lstools.jl @@ -68,13 +68,13 @@ function lseval(A::AbstractMatrix, E::Union{AbstractMatrix,UniformScaling{Bool}} else (E == I || rcond(E,atol2) > toleps) && (return T.(D)) At, Et, Bt, Ct, Dt, = lsminreal2(A, E, B, C, D; finite = false, fast = fast, atol1 = atol1, atol2 = atol2, rtol = rtol) - if rcond(Et,atol2) < toleps + if size(At,1) > 0 && rcond(Et,atol2) < toleps G = zeros(T,p,m) for i = 1:p At1, Et1, Bt1, Ct1, Dt1, = lsminreal2(At, Et, Bt, view(Ct,i:i,:), view(Dt,i:i,:); finite = false, contr = false, noseig = false, fast = fast, atol1 = atol1, atol2 = atol2, rtol = rtol) for j = 1:m At11, Et11, Bt11, Ct11, Dt11, = lsminreal2(At1, Et1, view(Bt1,:,j:j), Ct1, view(Dt1,:,j:j); finite = false, obs = false, noseig = true, fast = fast, atol1 = atol1, atol2 = atol2, rtol = rtol) - rcond(Et11,atol2) < toleps ? G[i,j] = T(Inf) : G[i,j] = Dt11[1,1] + size(At11,1) > 0 && rcond(Et11,atol2) < toleps ? G[i,j] = T(Inf) : G[i,j] = Dt11[1,1] end end return G diff --git a/src/rmtools.jl b/src/rmtools.jl index 40f7573..23f147b 100644 --- a/src/rmtools.jl +++ b/src/rmtools.jl @@ -348,7 +348,7 @@ machine epsilon of the element type of coefficients of `A`. The keyword argument `gaintol` specifies the threshold for the magnitude of the nonzero elements of the gain matrix `C*inv(γE-A)*B+D`, where `γ = val` if `val` is a number or `γ` is a randomly chosen complex value of unit magnitude, -if `val = missing`. Generally, `val` should not be a root of any of entries of `P`. +if `val = missing`. Generally, `val` should not be a zero of any of entries of `R`. `NUM(λ)` is a polynomial matrix of the form `NUM(λ) = N_1 + λ N_2 + ... + λ**k N_(k+1)`, for which the coefficient matrices `N_i`, `i = 1, ..., k+1` are stored in the 3-dimensional matrix `NUM`,