possible to use logical indexing with an array argument ?

조회 수: 1 (최근 30일)
RuiQi
RuiQi 2017년 1월 17일
댓글: John Chilleri 2017년 1월 18일
is there a way I can convert this code
for i=1:15653
label == i
end
to a vectorized one ?
i=1:15653;
label == i
  댓글 수: 1
Stephen23
Stephen23 2017년 1월 17일
편집: Stephen23 2017년 1월 17일
What is wrong with
i=1:15653;
label == i
?
What do you want to do with this?

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

채택된 답변

John Chilleri
John Chilleri 2017년 1월 17일
편집: John Chilleri 2017년 1월 17일
Hello,
WhateverYouWant = (label == 1:15653);
Note: assuming label is also a 15653 length vector OR a scalar.
Hope this helps!
  댓글 수: 2
RuiQi
RuiQi 2017년 1월 18일
Sorry I was sure it didnt work when I typed
la
label == i
earlier on
John Chilleri
John Chilleri 2017년 1월 18일
No worries! Glad I could help!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by