Cell/Struct Tree, and Struct Sorting
Given a cell or a struct, is is sometimes usefull to know the tree from the main to the farthest branch.
The trees are returned as string cells, based on the data type. Each path can be effectively executed using Matlab built-in eval() function.
The sorting of struct is also implemented, with some limitations.
Sorting is achieved based on Matlab built-in sort() function, in reference to one of the fields. Therefore all fields should have equal number of elements.
Sorting cells in relation to one of the field is not implemented.
Citar como
T. R. (2024). Cell/Struct Tree, and Struct Sorting (https://www.mathworks.com/matlabcentral/fileexchange/31736-cell-struct-tree-and-struct-sorting), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
- MATLAB > Language Fundamentals > Data Types > Structures >
- MATLAB > Language Fundamentals > Data Types > Cell Arrays >
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
cstreesort/
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |