File Exchange

image thumbnail

STRUCT2STR

version 1.0.0.0 (2.98 KB) by Marco Cococcioni
Converts a struct intoa char string and, if needed, display the string. The function allows exportin

6 Downloads

Updated 16 May 2007

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

STRUCT2STR - Converts a struct into a char string and optionally display its pairs of field names and field values in a list box.
The rows of the list box visualizing the fields can be individually selected, and the corresponding fields can be copied to the clipboard.
In this way, this function can be used to paste significant fields of a struct to a plain text file, for documentation purposes.
By displaying the obtained char string we get a similar output as the one generated by the Matlab built-in function DISP, when called on
the original struct.

Cite As

Marco Cococcioni (2020). STRUCT2STR (https://www.mathworks.com/matlabcentral/fileexchange/15017-struct2str), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Ben Travaglione

Appears to do exactly what it says - very handy!

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: struct2str recursive