Sort rows based on number of 1's in each row.
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Ananya Malik
 am 20 Mär. 2018
  
    
    
    
    
    Kommentiert: Ananya Malik
 am 20 Mär. 2018
            I have a matrix A = [1 1 0 1; 1 0 0 0 ; 1 0 1 0 ; 1 1 1 1]; I count the number of 1's in each row and I get count=[3 1 2 4]. I want to get A' = [1 1 1 1; 1 1 0 1; 1 0 1 0; 1 0 0 0]; How to get it. TIA.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Shifting and Sorting Matrices finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

