replace with nans after condition

8 次查看(过去 30 天)
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];

采纳的回答

madhan ravi
madhan ravi 2019-3-18
Out = A;
Out(A < (max(A)/100)*15)=nan

更多回答(1 个)

Fangjun Jiang
Fangjun Jiang 2019-3-18
A(A<0.15*A_max)=nan
  2 个评论
Asliddin Komilov
Asliddin Komilov 2020-1-17
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by