Development Environment |
Using the diary Command to Export Data
To export small numeric arrays or cell arrays, you can use the diary
command. diary
creates a verbatim copy of your MATLAB session in a disk file (excluding graphics).
For example, if you have the array A
in your workspace,
execute these commands at the MATLAB prompt to export this array using diary
:
diary
function. You can optionally name the output file diary
creates.
A
. You could also display a cell array or other MATLAB data type.
diary
function.
diary
creates the file my_data.out
and records all the commands executed in the MATLAB session until it is turned off.
Exporting Delimited ASCII Data Files | Importing Binary Data |