Commit 863dee7a authored by ratto's avatar ratto
Browse files

Bug fix for the case of perfectly orthogonal pairs

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2994 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 163d893e
......@@ -31,7 +31,11 @@ X = H(:,2:end);
% X = H(:,2:end);
yhat = X*(X\y);
co = y'*yhat/sqrt((y'*y)*(yhat'*yhat));
if rank(yhat),
co = y'*yhat/sqrt((y'*y)*(yhat'*yhat));
else
co=0;
end
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