"length" doesnt work

17 vues (au cours des 30 derniers jours)
MiauMiau
MiauMiau le 2 Fév 2013
Hi
I have the following problem:
>> x = [1 2 3]
x =
1 2 3
>> length(x)
Index exceeds matrix dimensions.
????

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 2 Fév 2013
Modifié(e) : Azzi Abdelmalek le 2 Fév 2013
clear length
x=[1 2 3]
length(x)
% Maybe you've used length as a variable
  1 commentaire
MiauMiau
MiauMiau le 2 Fév 2013
That's right, I indeed did. Thanks a lot

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by