Filter Matrix over a specific value
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Eren Atar
am 14 Jun. 2022
Beantwortet: Dyuman Joshi
am 14 Jun. 2022
data = [1:10];
idx = data > 5;
%output only logical values
I want to filter my values, aim would be to get all values in a matrix that are bigger than 5 and everything below should be "deleted".
So the new dimension for this example would be 1x4 [6,7,8,9,10].
How can I implement this?
1 Kommentar
Akzeptierte Antwort
Dyuman Joshi
am 14 Jun. 2022
The new dimension would be 1x5, not 1x4
data=1:10
data(data>5)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices 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!