Warning: Input arguments must be scalar.

83 ビュー (過去 30 日間)
namrata parikh
namrata parikh 2012 年 6 月 19 日
コメント済み: Besim Sen 2021 年 6 月 9 日
X=zeros(1,m1);
when i run this command it gives me the Warning: Input arguments must be scalar. can anyone help me with what causes this problem and what i can do to solve it!!

回答 (2 件)

Image Analyst
Image Analyst 2012 年 6 月 19 日
Hover over m1 when you've stopped there at a breakpoint. Chances are m1 is either a real number with some fractional part, or a matrix, or a negative number, or some other illegal entry.
  1 件のコメント
Besim Sen
Besim Sen 2021 年 6 月 9 日
thanks broo

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


Christoph
Christoph 2012 年 6 月 19 日
hi namrata,
you should check if m1 is a scalar. It seems m1 is a vector or someting else.
reagrds, CN
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 6 月 19 日
I agree: m1 was probably created by applying size() to a vector, and the cure is probably to use length() of the vector instead.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by