필터 지우기
필터 지우기

integer operands are required for colon operator when used as index

조회 수: 2 (최근 30일)
Ulrik Nash
Ulrik Nash 2012년 1월 24일
Why do I get the warning "integer operands are required for colon operator when used as index" in the final line is this code:
vector_examined = rand(items,1); criteria = vector_examined < value; passes = find(criteria);
  댓글 수: 2
the cyclist
the cyclist 2012년 1월 24일
Would it be possible for you to post some self-contained code that will produce the error (without us having to guess what "items" and "value" look like)? For example, if I choose items=5 and value=0.2, your code runs just fine for me.
Walter Roberson
Walter Roberson 2012년 1월 24일
I do not see anything obvious. Is it possible that you typed this line in for us, rather than using copy-and-paste? Could you also show us the previous line?

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

답변 (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