Refer to elements in a matrix
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
Honglei Chen
el 30 de En. de 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
Categorías
Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!