"length" doesnt work

Hi
I have the following problem:
>> x = [1 2 3]
x =
1 2 3
>> length(x)
Index exceeds matrix dimensions.
????

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 2일
편집: Azzi Abdelmalek 2013년 2월 2일

0 개 추천

clear length
x=[1 2 3]
length(x)
% Maybe you've used length as a variable

댓글 수: 1

MiauMiau
MiauMiau 2013년 2월 2일
That's right, I indeed did. Thanks a lot

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by