If you want to use your data in another application that reads ASCII files, MATLAB® functions offer several data export options. For example, you can create a:
Rectangular, delimited ASCII data file from an array. For more information, see Write to Delimited Data Files.
Rectangular, delimited ASCII data file from a table. For more information, see writetable.
Diary (or log) file of keystrokes and the resulting text output. For more information, see Write to a Diary File.
MEX-file to access your C/C++ or Fortran routine that writes to a particular text file format. For more information, see MEX-Files Call C/C++ and Fortran Programs.
Additional MATLAB functions export data to spreadsheets, scientific data formats, and other file formats. For a complete list, see Supported File Formats.