Refer to elements in a matrix
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
Honglei Chen
am 30 Jan. 2017
1 Stimme
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
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!