Error using length() command ??

조회 수: 15 (최근 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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by