Keeping only rows in a matrix that are above a threshold
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Caroline Szujewski
am 8 Jan. 2024
Kommentiert: Image Analyst
am 9 Jan. 2024
Hello,
I have a table made in matlab with 13 columns. It will have a varying number of rows depending on the dataset. How do I write code to make a new table that only keeps the rows if the value in column 9 in that row is above a certain threshold? This threshold is already called height_F in my code. Likewise, how would I say keep all rows only if the value in column 9 is below a certain threshold?
Thank you!
0 Kommentare
Akzeptierte Antwort
Matt J
am 9 Jan. 2024
Bearbeitet: Matt J
am 9 Jan. 2024
For example,
subTable = yourTable( yourTable{:,9}>height_F, : )
1 Kommentar
Image Analyst
am 9 Jan. 2024
@Caroline Szujewski this should work. If it doesn't, reply back.
If this Answer solves your original question, then could you please click the "Accept this answer" link to award the answerer with "reputation points" for their efforts in helping you? They'd appreciate it. Thanks in advance. 🙂 Note: you can only accept one answer (so pick the best one) but you can click the "Vote" icon for as many Answers as you want. Voting for an answer will also award reputation points.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!