How to find out the value of a matrix corresponding row and column?
1 次查看(过去 30 天)
显示 更早的评论
采纳的回答
Stephen23
2019-8-30
>> x = [1;2;3];
>> y = [1;1;2];
>> z = [0,4;5,6;1,0];
>> z(sub2ind(size(z),x,y))
ans =
0
5
0
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!