How to sort the matrix according to specific row?
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
I have a population generated by pop=[pop;x;y;z;cst,fr]; where first 4 rows are x, second 3 rows are y and third 8 rows are z. cst is sum of column 1 and fr is calculated failure rate of column 2.
            6        0.876
            5         0.99
            3        0.939
            6        0.876
            4        0.837
            7        0.959
            4        0.953
            4        0.873
            0            0
            5         0.95
            3        0.855
            4        0.873
            4        0.873
            5         0.95
            6        0.951
           66   0.00032352            
            6        0.876
            6        0.876
            6        0.965
            6        0.965
            4        0.953
            4        0.837
            4        0.953
            0            0
            3        0.855
            6        0.951
            5         0.95
            0            0
            0            0
            3        0.855
            6        0.951
           59   0.00038143
            6        0.965
            5        0.888
            6        0.965
            3        0.863
            7        0.889
            7        0.959
            4        0.953
            7        0.915
            6        0.968
            3        0.855
            3        0.855
            8        0.942
            4        0.873
            3        0.855
            8        0.942
           80    0.0002327
How can I sort the specific (16,32,48) rows followed by unchanged (1:15,17:31,33:47)? for example:
            6        0.876
            6        0.876
            6        0.965
            6        0.965
            4        0.953
            4        0.837
            4        0.953
            0            0
            3        0.855
            6        0.951
            5         0.95
            0            0
            0            0
            3        0.855
            6        0.951
           59   0.00038143
            6        0.876
            5         0.99
            3        0.939
            6        0.876
            4        0.837
            7        0.959
            4        0.953
            4        0.873
            0            0
            5         0.95
            3        0.855
            4        0.873
            4        0.873
            5         0.95
            6        0.951
           66   0.00032352
            6        0.965
            5        0.888
            6        0.965
            3        0.863
            7        0.889
            7        0.959
            4        0.953
            7        0.915
            6        0.968
            3        0.855
            3        0.855
            8        0.942
            4        0.873
            3        0.855
            8        0.942
           80    0.0002327
Please help!
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

