Limiting the values of a column

4 次查看(过去 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 个评论
Asad (Mehrzad) Khoddam
Is it a matrix or table, can you show your variable?
Hazem Al-Bulqini
Hazem Al-Bulqini 2020-9-14
A vector of almost 70000 rows and one column.

请先登录,再进行评论。

采纳的回答

the cyclist
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 CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by