필터 지우기
필터 지우기

Keeping only rows in a matrix that are above a threshold

조회 수: 7 (최근 30일)
Caroline Szujewski
Caroline Szujewski 2024년 1월 8일
댓글: Image Analyst 2024년 1월 9일
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!

채택된 답변

Matt J
Matt J 2024년 1월 9일
편집: Matt J 2024년 1월 9일
For example,
subTable = yourTable( yourTable{:,9}>height_F, : )
  댓글 수: 1
Image Analyst
Image Analyst 2024년 1월 9일
@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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by