How to extract two equal maximum values at different index
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi guys, 
How can I point out the different location of two maximum values 
example A = [8,5,6,7,8]
If i type [max_A, index] = max(A), it will give me max = 8 and index = 1, but in this case the index must be 1 and 5.
0 Commenti
Risposta accettata
Più risposte (1)
  KSSV
      
      
 il 20 Mar 2019
        A = [8,5,6,7,8]
maxval = max(A);
lia = ismember(A,maxval);
idx = find(lia);
0 Commenti
Vedere anche
Categorie
				Scopri di più su Matrix Indexing 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!


