indexing of a matrix
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
hi, i av a 200*3588 matrix and i want to index paired numbers from each column.is there a matlab function that will help me do it or do i av to do it manually? thanks in advance
1 Commento
Risposta accettata
Walter Roberson
il 9 Nov 2011
rowidx = [rowidx1, rowidx2, rowidx3, ... rowidx200];
matind = sub2ind(size(YourMatrix), [rowidx; 1+rowidx], repmat(1:size(YourMatrix,2), 2, 1) );
pairedValues = YourMatrix(matind);
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!