Finding row values given a position.
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Riley Heymann
am 25 Mär. 2022
Bearbeitet: Riley Heymann
am 27 Mär. 2022
After using the "find" function to get the position of a value in a matrix, how do I retreive the values in the corrosponding row?
1 Kommentar
Akzeptierte Antwort
Mathieu NOE
am 25 Mär. 2022
hello
see example below :
use find with linear indices output (see the doc)
A = randn(5,3)
ind = find(A>0 & A<1)
B = A(ind)
2 Kommentare
Rik
am 25 Mär. 2022
I interpreted the question a bit differently:
A = randn(5,3)
[r,c]=find(A>0.7)
B = A(unique(r),:)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!