The parameter 'Y' must be a real-valued vector with length same as the columns of 'X'.
7 次查看(过去 30 天)
显示 更早的评论
I have a 447x10 matrix, which I subdivided into a 447x1 vector of an Y-response variable and a 447-9 vector of a X-predictor variables. I get the above error when I try:
[B,FitInfo] = lasso(Y,X);
Using n = length(Y) yields the same length for Y and X, while
tf = isreal(Y) and
tf = isreal(X)
both return 1, which means both Y and X are real-valued vectors with the same length. Anything I overlooked? Thanks
2 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!