Error using length() command ??

22 views (last 30 days)
Siddhant Raman
Siddhant Raman on 26 Jan 2013
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 =
>> length(mychar)
??? Index exceeds matrix dimensions.

Answers (1)

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

Community Treasure Hunt

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

Start Hunting!