Size input must be scalar error while using rand
6 次查看(过去 30 天)
显示 更早的评论
I'm trying to run the code:
k = 2:5;
A = rand(k, 4);
disp(rref(A));
It keeps giving me the error "size input must be scalar." I don't know what to change... Thank you in advance.
0 个评论
采纳的回答
Stephen23
2017-1-30
The syntax you use does not work because k is a vector. Taking a wild stab in the dark:
for k = 2:5
A = rand(k,4);
... your code
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Octave 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!