bubblesortdim - array sort using just a column as parameter
Version 1.0.0 (1,28 ko) par
Henrique Costa
Sorts array lines using only one column as the dimension to be sorted
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)
Citation pour cette source
Henrique Costa (2026). bubblesortdim - array sort using just a column as parameter (https://fr.mathworks.com/matlabcentral/fileexchange/71960-bubblesortdim-array-sort-using-just-a-column-as-parameter), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Créé avec
R2019a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS LinuxCatégories
En savoir plus sur Shifting and Sorting Matrices dans Help Center et MATLAB Answers
Tags
Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
| Version | Publié le | Notes de version | |
|---|---|---|---|
| 1.0.0 |
