struct2csv

Output a structure to a .csv file, with column headers

You are now following this Submission

STRUCT2CSV(s,fn)

Output a structure of matrices and cell arrays to a comma delimited file with field names as column headers. A simple method for exporting data structures.

s : any structure composed of one or more matrices and/or cell arrays
fn : file name

Written by James Slegers, james.slegers_at_gmail.com

Covered by the BSD License

Cite As

James Slegers (2026). struct2csv (https://www.mathworks.com/matlabcentral/fileexchange/34889-struct2csv), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.4.0.0

Rewrote significant portions of code, in response to noted bugs. Hopefully, the noted bugs have been remedied.

1.0.0.0