MATLAB Answers

mvregress fails to solve same problem as regress?

2 views (last 30 days)
Matthew on 22 Sep 2014
Commented: Matthew on 22 Sep 2014
X = 1:10; X=X';
Y = X;
% i.e. just the line y=x
regress(Y,X); % returns "1", as expected
mvregress(X,Y); % returns the following error:
% Error using mvregress (line 452)
% Covariance is not positive-definite.
Am I missing something here?
My definitions of X and Y for mvregress seem to correspond with the documentation...


Roger Wohlwend
Roger Wohlwend on 22 Sep 2014
My Matlab does not throw an error. Which release are you using?

Sign in to comment.

Answers (0)

Sign in to answer this question.