Impose always the same dimension for eigenvector matrix.

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3000 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
ratto 2009-09-30 07:18:27 +00:00
parent 3739a7a6d8
commit 3ef53218b8
1 changed files with 8 additions and 4 deletions

View File

@ -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