possible to use logical indexing with an array argument ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
RuiQi
il 17 Gen 2017
Commentato: John Chilleri
il 18 Gen 2017
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 Commento
Risposta accettata
John Chilleri
il 17 Gen 2017
Modificato: John Chilleri
il 17 Gen 2017
Hello,
WhateverYouWant = (label == 1:15653);
Note: assuming label is also a 15653 length vector OR a scalar.
Hope this helps!
2 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!