regress error, number of rows
7 views (last 30 days)
Show older comments
Jeroen van Eldert
on 25 Feb 2019
Commented: Fangjun Jiang
on 25 Feb 2019
Hej,
I try to do a multi linear regression between two vectors, but I recieve an error in the length of the vector, although the number of rows is equal (size: 1540x4 and size: 1540x1), see below. Can anyone explain this error and how to fix it?
cheers,
Jeroen
>> b = regress(Mean_wall_1(:,[5 10 11 12]),Q_201_cl(:,2));
Error using regress (line 62)
Y must be a vector and must have the same number of rows as X.
>> size(Mean_wall_1(:,[5 10 11 12]))
ans =
1540 4
>> size(Q_201_cl(:,2))
ans =
1540 1
0 Comments
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!