How to Find a Value From Another Value?
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (1)
Andrei Bobrov
am 7 Dez. 2017
Bearbeitet: Andrei Bobrov
am 7 Dez. 2017
A = reshape(1:16,4,[]); % Let A - your array (example)
out = A(A(:,end) == 14,1)
2 Kommentare
Rafael
am 7 Dez. 2017
Andrei Bobrov
am 7 Dez. 2017
A = reshape(1:16,4,[]);
It's example of your array.
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!