possible to use logical indexing with an array argument ?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Réponse acceptée
John Chilleri
le 17 Jan 2017
Modifié(e) : John Chilleri
le 17 Jan 2017
Hello,
WhateverYouWant = (label == 1:15653);
Note: assuming label is also a 15653 length vector OR a scalar.
Hope this helps!
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Numeric Types dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!