How to save a structure array to a text file
In MATLAB how do I save a structure array to a text file so that it displays everything the structure array shows in the command window? You have to define a format for your file first. Saving to a MATLAB workspace file (.MAT) If you don't care about the format, and simply want to be able to load the data at a later time, use save , for example: save 'myfile.mat' structarr That stores struct array structarr in a binary MAT file named "file.mat". To read it back into your workspace you can use load : load 'myfile.mat' Saving as comma-separated values (.CSV) If you want to save your struct array