What type of sort does the SORT function in MATLAB perform?
28 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2009 年 6 月 27 日
コメント済み: Royi Avital
2020 年 9 月 11 日
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!