class2struct
Versione 1.2.0.0 (1,42 KB) da
Ofek
Strip all class methods, leaving just the bare data as struct fields
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.
Cita come
Ofek (2026). class2struct (https://it.mathworks.com/matlabcentral/fileexchange/58426-class2struct), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Creato con
R2016a
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS LinuxCategorie
Scopri di più su Data Type Conversion in Help Center e MATLAB Answers
Tag
Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
