How to replace value if it is multiple of other Value
    3 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hello, I have the following value 
Maximumvalue=45
Minimumvalue=15
I want apply a if else condition if the Maximumvalue if multiple of Minimumvalue then Maximumvalue should be replace with Minimum Value,
How can i do it in matlab
0 Commenti
Risposta accettata
  KSSV
      
      
 il 16 Dic 2022
        A = [3 4 5 9] 
[A0,idx0] = min(A) ;
[A1,idx1] = max(A) ;
if ~mod(A1,A0)
   A(idx1) = A0 ;    
end
A
0 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Data Types in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

