Limiting the values of a column
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a column 'y' contains different values. I want to only take the values between -10 and 10 in an other column.
How can I do that?
댓글 수: 2
채택된 답변
the cyclist
2020년 9월 14일
If you mean that y is a column vector, then
y_new = y((y>=-10) & (y<=10))
will give you a new column vector with only the values between (and including) -10 and 10.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!