Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
SORT_BACK ( data = sort_back( data, indexes, dimension ) )
Sort back data to original order by using the indexes obtained from sorting and the sorted dimension.
Supports arrays of any dimension, and cellstrings.
Works on arrays of any dimension:
y = randn(3,4,2);
[y,ind] = sort(y,2);
do stuff with sorted y...
y2 = sort_back( y, ind, 2 );
Also works on cellstrings (vectors):
C = {'hello' 'yes' 'no' 'goodbye'};
[C,ind] = sort(C);
C2 = sort_back(C,ind);
Citation pour cette source
Ivar Eskerud Smith (2026). Sort back data to original order (https://fr.mathworks.com/matlabcentral/fileexchange/28548-sort-back-data-to-original-order), MATLAB Central File Exchange. Extrait(e) le .
Informations générales
- Version 1.4.0.0 (1,87 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 1.4.0.0 | 28-08-2010: The first implementation was quite simple and did not support nd-arrays. This is an improved version which supports nd-arrays and cellstrings, and does more error checks on the input. |
||
| 1.3.0.0 | Last update was buggy... Should now work on both 1d and nd arrays |
||
| 1.2.0.0 | Updated to include n-dimensional arrays |
||
| 1.0.0.0 |
