possible to use logical indexing with an array argument ?

1 次查看(过去 30 天)
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

采纳的回答

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!

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by