Commit 3ef53218 authored by ratto's avatar ratto
Browse files

Impose always the same dimension for eigenvector matrix.

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3000 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 3739a7a6
......@@ -30,8 +30,10 @@ covH = H1'*H1;
sdH = sqrt(diag(covH));
sdH = sdH*sdH';
[e1,e2] = eig( (H1'*H1)./sdH );
eH = NaN(npar,length(ind1));
eH(ind1,:) = e1;
eH = zeros(npar,npar);
% eH(ind1,:) = e1;
eH(ind1,length(find(vnorm(H)==0))+1:end) = e1;
eH(find(vnorm(H)==0),1:length(find(vnorm(H)==0)))=eye(length(find(vnorm(H)==0)));
condH = cond(H1'*H1);
ind2 = find(vnorm(JJ)~=0);
......@@ -40,8 +42,10 @@ covJJ = JJ1'*JJ1;
sdJJ = sqrt(diag(covJJ));
sdJJ = sdJJ*sdJJ';
[ee1,ee2] = eig( (JJ1'*JJ1)./sdJJ );
eJ = NaN(npar,length(ind2));
eJ(ind2,:) = ee1;
% eJ = NaN(npar,length(ind2));
eJ = zeros(npar,npar);
eJ(ind2,length(find(vnorm(JJ)==0))+1:end) = ee1;
eJ(find(vnorm(JJ)==0),1:length(find(vnorm(JJ)==0)))=eye(length(find(vnorm(JJ)==0)));
condJ = cond(JJ1'*JJ1);
if rank(H)<npar
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment