Borrar filtros
Borrar filtros

replace with nans after condition

8 visualizaciones (últimos 30 días)
Leela Sai Krishna
Leela Sai Krishna el 18 de Mzo. de 2019
Comentada: Asliddin Komilov el 17 de En. de 2020
How to do this process
A=[10,0.5
1,8
8,0];
A_max =max(A);
out=[10,8];
i want to replace values <15%A_max with nans
output matrix
Out=[10,nan %0.5 is less than the 15%8
nan,8 % 1 is <15%10
8,nan];

Respuesta aceptada

madhan ravi
madhan ravi el 18 de Mzo. de 2019
Out = A;
Out(A < (max(A)/100)*15)=nan
  3 comentarios
Leela Sai Krishna
Leela Sai Krishna el 19 de Mzo. de 2019
It showing
Error using <
Matrix dimensions must agree.
How to rectify this error
madhan ravi
madhan ravi el 20 de Mzo. de 2019
Editada: madhan ravi el 20 de Mzo. de 2019

Iniciar sesión para comentar.

Más respuestas (1)

Fangjun Jiang
Fangjun Jiang el 18 de Mzo. de 2019
A(A<0.15*A_max)=nan
  2 comentarios
Leela Sai Krishna
Leela Sai Krishna el 18 de Mzo. de 2019
its working, Thanks a lot
Asliddin Komilov
Asliddin Komilov el 17 de En. de 2020
I have set of 25 variables (matrices), can I have repliced all zero value to NAN in all of the at once, without doing it for each of them separately?
thanks

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB 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