index must be a positive integer or logical
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, Please how to solve this problem : "Attempted to access f(0); index must be a positive integer or logical" thnks
댓글 수: 0
채택된 답변
Mischa Kim
2014년 5월 18일
Sabrina, difficult to say without seeing the code. However, in MATLAB indexing starts with 1, not 0:
>> a = [4 3 2 1]
a =
4 3 2 1
>> a(0)
Subscript indices must either be real positive integers or logicals.
>> a(1)
ans =
4
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!