Refer to elements in a matrix
古いコメントを表示
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.
採用された回答
その他の回答 (1 件)
Honglei Chen
2017 年 1 月 30 日
1 投票
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
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!