From aada743d47124bff901b39f6267d414af0f24961 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 16 Mar 2023 15:54:51 +0100
Subject: [PATCH] Remove workaround for eig() function under Octave

The eig() function has been been able to return the left eigenvectors since at
least Octave 4.4.
---
 matlab/identification_analysis.m | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/matlab/identification_analysis.m b/matlab/identification_analysis.m
index 7344212baf..308be40b6a 100644
--- a/matlab/identification_analysis.m
+++ b/matlab/identification_analysis.m
@@ -335,14 +335,7 @@ if info(1) == 0 %no errors in solution
                 cmm = simulated_moment_uncertainty(ind_dMOMENTS, periods, replic,options_,M_,oo_); %covariance matrix of moments
                 sd = sqrt(diag(cmm));
                 cc = cmm./(sd*sd');
-                if isoctave
-                    [VV,DD] = eig(cc);
-                    %fix for older Matlab versions that do not support computing left eigenvalues, see http://mathworks.com/help/releases/R2012b/matlab/ref/eig.html
-                    [WW,~] = eig(cc.');
-                    WW = conj(WW);
-                else
-                    [VV,DD,WW] = eig(cc);
-                end
+                [VV,DD,WW] = eig(cc);
                 id = find(diag(DD)>tol_deriv);
                 siTMP = si_dMOMENTS./repmat(sd,[1 totparam_nbr]);
                 MIM = (siTMP'*VV(:,id))*(DD(id,id)\(WW(:,id)'*siTMP));
-- 
GitLab