How to Find a Value From Another Value?
3 次查看(过去 30 天)
显示 更早的评论
I have a matrix, so I would like to find a value from the first column by using values from the last columns. For example, I have an specific value from the last column which I found by suing "find". How can I then find the value from the first column from that specific row by using the last column value?
0 个评论
采纳的回答
更多回答(1 个)
Andrei Bobrov
2017-12-7
编辑:Andrei Bobrov
2017-12-7
A = reshape(1:16,4,[]); % Let A - your array (example)
out = A(A(:,end) == 14,1)
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!