Removed trap which sometimes gives problems.

time-shift
Marco Ratto 2011-05-02 11:03:56 +02:00
parent 180a3bad9c
commit 7cdd0250f8
1 changed files with 1 additions and 8 deletions

View File

@ -27,14 +27,7 @@ function [co, b, yhat] = cosn(H);
y = H(:,1);
X = H(:,2:end);
% y = H(:,1);
% X = H(:,2:end);
if size(X,2)==1;
b=1;
else
b=(X\y);
end
b=(X\y);
yhat = X*b;
if rank(yhat),
co = abs(y'*yhat/sqrt((y'*y)*(yhat'*yhat)));