access the row and col of a matrix
5 次查看(过去 30 天)
显示 更早的评论
i have a matrix
A = [11 12 13
14 15 16
17 18 19];
now i take a value 6... how can i get the value there and and row and column....
eg: value = 16
row = 2
col = 3
0 个评论
采纳的回答
更多回答(2 个)
dbmn
2017-4-21
2 Possibilities
Easiest: row column
A(2,3)
Second possibility (by element count)
A(8)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!