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!