"length" doesnt work

16 views (last 30 days)
MiauMiau
MiauMiau on 2 Feb 2013
Hi
I have the following problem:
>> x = [1 2 3]
x =
1 2 3
>> length(x)
Index exceeds matrix dimensions.
????

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 2 Feb 2013
Edited: Azzi Abdelmalek on 2 Feb 2013
clear length
x=[1 2 3]
length(x)
% Maybe you've used length as a variable
  1 Comment
MiauMiau
MiauMiau on 2 Feb 2013
That's right, I indeed did. Thanks a lot

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!