bubblesortdim - array sort using just a column as parameter

版本 1.0.0 (1.3 KB) 作者: Henrique Costa
Sorts array lines using only one column as the dimension to be sorted
12.0 次下载
更新时间 2019/6/26

查看许可证

Sorts array lines using only one column as the dimension to be sorted.
Works with arrays of multiple dimensions.
ex.
a= [ 1 5 3;
4 2 6;
7 8 9];
sorted=bublesortdim(a,2);
sorted results in
[4 2 6;
1 5 3;
7 8 9];
OBS: column 2 is sorted but the lines are preserved
OBS: Implemented with buble sort (https://ieeexplore.ieee.org/document/5763927)

引用格式

Henrique Costa (2024). bubblesortdim - array sort using just a column as parameter (https://www.mathworks.com/matlabcentral/fileexchange/71960-bubblesortdim-array-sort-using-just-a-column-as-parameter), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2019a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Shifting 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