Error using length() command ??

5 visualizaciones (últimos 30 días)
Siddhant Raman
Siddhant Raman el 26 de En. de 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 =
r
>> length(mychar)
??? Index exceeds matrix dimensions.

Respuestas (1)

Evgeny Pr
Evgeny Pr el 26 de En. de 2013
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)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by