Limiting the values of a column

4 visualizaciones (últimos 30 días)
Hazem Al-Bulqini
Hazem Al-Bulqini el 14 de Sept. de 2020
Comentada: Hazem Al-Bulqini el 14 de Sept. de 2020
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 comentarios
Asad (Mehrzad) Khoddam
Asad (Mehrzad) Khoddam el 14 de Sept. de 2020
Is it a matrix or table, can you show your variable?
Hazem Al-Bulqini
Hazem Al-Bulqini el 14 de Sept. de 2020
A vector of almost 70000 rows and one column.

Iniciar sesión para comentar.

Respuesta aceptada

the cyclist
the cyclist el 14 de Sept. de 2020
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.

Más respuestas (0)

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by