Error using length() command ??

17 ビュー (過去 30 日間)
Siddhant Raman
Siddhant Raman 2013 年 1 月 26 日
I typed these lines in the command window and got the error message . Any idea why is this happening ??
>> mychar = input('Enter any Character : ','s')
Enter any Character : r
mychar =
r
>> length(mychar)
??? Index exceeds matrix dimensions.

回答 (1 件)

Evgeny Pr
Evgeny Pr 2013 年 1 月 26 日
You redefined LENGTH?
For example:
length = []
length('r')
Index exceeds matrix dimensions.
which('length')
length is a variable.
Must be:
which('length')
built-in (<matlabroot>\toolbox\matlab\elmat\length)

カテゴリ

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