What type of sort does the SORT function in MATLAB perform?
조회 수: 28 (최근 30일)
이전 댓글 표시
Could you tell me the algorithm and/or the running time of the SORT function?
I need to know which sorting algorithm is used by MATLAB when the SORT function is executed.
채택된 답변
MathWorks Support Team
2009년 6월 27일
편집: MathWorks Support Team
2018년 4월 6일
The type of sort that is done is a Quick Sort. It is not an 'adaptive sorting' algorithm, and does not deviate much from the standard Quick Sort algorithm. Quick Sort has been found to be one of the fastest algorithms for sorting; it is an O(n log n) operation. We do not have specific time information, since it depends on both the system and the numerical data used in the sort.
추가 답변 (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!