Refer to elements in a matrix
Mostra commenti meno recenti
I have a 16 x 16 matrix defined and I need to pick the elements from this matrix based on some other numeric data that I will be processing. Eg: if the data is 26, I need to pick the element in row 2 column 6. Can someone please suggest a code for this?
Thanks in advance.
Risposta accettata
Più risposte (1)
Honglei Chen
il 30 Gen 2017
1 voto
You may want to look at ind2sub function, but do you mean data = 22? I couldn't see how the 2nd row 6th column maps to element 26.
HTH
Categorie
Scopri di più su Resizing and Reshaping Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!