MATLAB: Replace with nans after condition

conditionnan's

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];

Best Answer

Out = A;
Out(A < (max(A)/100)*15)=nan