optimize my matrix function
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
danielle sisserman
il 7 Nov 2020
Commentato: danielle sisserman
il 7 Nov 2020
this is my code:
t=1;
for j=k_indices
knn_labels(t,1) = classifier.Ytrain(j,1);
t = t+1;
end
what I'm doing here is using a vector of indices to create a vector of the values at those indices using some other matrix:
example:

But, I am sure that there is some pretty one liner that does this. Any one knows what that line looks like?
Thank you
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Problem-Based Optimization Setup in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!