class2struct

Version 1.2.0.0 (1,42 ko) par Ofek
Strip all class methods, leaving just the bare data as struct fields
54 téléchargements
Mise à jour 11 sept. 2016

Afficher la licence

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.

Citation pour cette source

Ofek (2025). class2struct (https://fr.mathworks.com/matlabcentral/fileexchange/58426-class2struct), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2016a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Data Type Conversion dans Help Center et MATLAB Answers
Tags Ajouter des tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.2.0.0

Fixed shape of embedded cell arrays and matrices
fix name

1.1.0.0

Documentation added and warnings handled

1.0.0.0