replace with nans after condition
    6 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Leela Sai Krishna
 am 18 Mär. 2019
  
    
    
    
    
    Kommentiert: Asliddin Komilov
 am 17 Jan. 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];
0 Kommentare
Akzeptierte Antwort
  madhan ravi
      
      
 am 18 Mär. 2019
        Out = A;
Out(A < (max(A)/100)*15)=nan
3 Kommentare
  madhan ravi
      
      
 am 20 Mär. 2019
				
      Bearbeitet: madhan ravi
      
      
 am 20 Mär. 2019
  
			Looks like you have opened up a new question:https://in.mathworks.com/matlabcentral/answers/451040-error-using-matrix-dimensions-must-agree#answer_366174
Weitere Antworten (1)
  Fangjun Jiang
      
      
 am 18 Mär. 2019
        A(A<0.15*A_max)=nan
2 Kommentare
  Asliddin Komilov
 am 17 Jan. 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
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



