class2struct
Often one comes across the need to strip a class down to its bare data - in particular in contexts of serializing/deserializing, and working with it across external interfaces.
Matlab's built in struct(cls) doesn't suffice, as the class can have properties that are classes themselves. Hence, this small utility.
Please say if it helps you, and more importantly - if it doesn't.
Doesn't require any fancy new functionality - probably works in 2009+ versions, but I'm unable to test.
Citar como
Ofek (2025). class2struct (https://la.mathworks.com/matlabcentral/fileexchange/58426-class2struct), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
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.
