"length" doesnt work

19 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)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!