nestedstruct2cell
Aucune licence
NESTEDSTRUCT2CELL allows for workspace visualization of nested structural arrays, and also offers an alternative method of constructing nested structures through its companion function CELL2NESTEDSTRUCT (also available at MATLAB Central).
Example:
clear S;
S.water.a=111;
S.water.b=222;
S.melon=[];
S.a.b.c.d.e='aaa';
S.q.r=cell(6,2);
[C] = nestedstruct2cell(S)
C =
'water' 'a' '' '' '' [ 111]
'water' 'b' '' '' '' [ 222]
'melon' '' '' '' '' []
'a' 'b' 'c' 'd' 'e' 'aaa'
'q' 'r' '' '' '' {6x2 cell}
Data is stored in the final column irrespective of the nesting level of a given branch. Empty cells indicate that the branch is terminated at the leftmost non-empty nesting level.
Citation pour cette source
Todd Pataky (2025). nestedstruct2cell (https://fr.mathworks.com/matlabcentral/fileexchange/11203-nestedstruct2cell), MATLAB Central File Exchange. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!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.0 |