How to avoid for loop when indexing?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Mantas Vaitonis
le 2 Juil 2018
Commenté : Mantas Vaitonis
le 2 Juil 2018
Hello,
I have the following for loop, where pairs(500x10), is there to calculate cc without for loop?
for i=1:500
cc(i,:)=pairs(i,pairs(i,:));
end
4 commentaires
Stephen23
le 2 Juil 2018
@Mantas Vaitonis: given that pairs contains non-integer values, what do you expect
pairs(i,pairs(i,:));
to do?
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing 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!