Generalized Sorting

Sort any kind of data based on user-defined criteria.
ダウンロード: 4.2K
更新 2005/1/21

ライセンスの表示

QUICKSORT allows the user to sort by any desired criteria. The user passes the data and a comparison function to the QUICKSORT and QUICKSORT returns an indexing vector sorted based on the comparison function.

The comparison function may be an inline function or a function handle. Function handles are an order of magnitude faster than inline functions. I use the TMP_HANDLE utility for creating temporary function handles in MATLAB 6.

QUICKSORT is implemented in m-code and uses a modified quicksort algorithm which sorts by "less than", "equal to" and "greater than". It is much slower than the builtin sort function, but also much more flexible.

引用

Nathan Thern (2024). Generalized Sorting (https://www.mathworks.com/matlabcentral/fileexchange/6756-generalized-sorting), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R10
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersShifting and Sorting Matrices についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0