Sort Structure

Sort fields in ascending order.

Vous suivez désormais cette soumission

It really bugged me that MATLAB automatically adds a new field in a structure at the end of that structure.

This function remedies that problem. After you add a new field, just sort it with this function and everything is put into the right order again.

Notice that this function also sorts the structures within the structures and puts them at the beginning, before the other fields.

Citation pour cette source

Mark Jobse (2026). Sort Structure (https://fr.mathworks.com/matlabcentral/fileexchange/1958-sort-structure), MATLAB Central File Exchange. Extrait(e) le .

Remerciements

A inspiré : Order all fields

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0.0