You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This little helper function allows to obtain a string representation for Matlab class instances.
Main feature is that properties which are also objects are converted recursively.
The recursion level is represented by tab intendation.
The maximum depth is definable, but infinite loops are taken care of automatically.
For more detailed object analysis checkout the UIInspect (#17935) program, and for Java class inspection see checkClass (#26947).
However, if you want a lightweight, recursive string representation this tool might just be a good choice.
Cite As
Daniel Wirtz (2026). convert objects to string (https://se.mathworks.com/matlabcentral/fileexchange/33899-convert-objects-to-string), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: UIINSPECT - display methods, properties & callbacks of an object, checkClass - inspect a Java/Matlab/Python/COM/C++/.NET class
General Information
- Version 1.0.0.0 (2.48 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
