Size input must be scalar error while using rand

17 ビュー (過去 30 日間)
Cassandra Little
Cassandra Little 2017 年 1 月 30 日
コメント済み: Cassandra Little 2017 年 1 月 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.

採用された回答

Stephen23
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
  1 件のコメント
Cassandra Little
Cassandra Little 2017 年 1 月 30 日
Thank you so much!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeOctave についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by