필터 지우기
필터 지우기

matrix indexing

조회 수: 1 (최근 30일)
deji
deji 2011년 11월 16일
hi,
I av dis lines of code i'm trying to run. qpsk = [q1 q2 q3 q4];
index = [0 1 2 3]
A = qpsk(F)
F is an array with a single row with elements matching the index.
Any time i try to run it, i get an error message saying "Subscript indices must either be real positive integers or logicals." Pls wat am i doing wrong and how do i correct it?
Thanks in advance

채택된 답변

David Young
David Young 2011년 11월 16일
It is because the vector F is not logical and contains an element that is not a real positive integer.
Note that in MATLAB indices for vectors and matrices start from 1, not zero. So your vector index=[0 1 2 3] would not be useful as an index vector, because it contains zero. However, as you don't appear to use index, I'm not sure why you tell us its value.
To get detailed help, you need to tell us exactly what the value of F is, or how it is generated.
  댓글 수: 3
Daniel Shub
Daniel Shub 2011년 11월 16일
Look at that, F has a value that is not a real positive integer (i.e., the zeros). You probably want F+1.
deji
deji 2011년 11월 16일
thanks.. it worked

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by