Convert structures (nested) to text file and back
Version 1.0.0.0 (1.55 KB) by
David Manegold
This function takes a non-flat structure and writes it to a text file. Execute text to remake struc
Convert any flat or arbitrarily non-flat structure to a text file. to rebuild the structure, highlight and execute the text in the file.
(Currently only implemented for Structure with fields of type 'structure','[nxm] numeric scalars and matrices', and 'strings'
Add functionality for cells, f handles, etc as you like (space provided). Please update/repost if you make upgrades to this file.
Thank you.
Dave
Cite As
David Manegold (2026). Convert structures (nested) to text file and back (https://se.mathworks.com/matlabcentral/fileexchange/37552-convert-structures-nested-to-text-file-and-back), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2011b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Text Files in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |