|
More about this article
| Created: |
11/07/2008 10:33 |
| Modified: |
02/18/2009 01:23 |
|
How can I save MATLAB variables to a text file?
To save your matlab variables/arrays as ascii text, there are a number of things you can do. Here are some options in order of increasing difficultly:
- For small matrices, you can use the "diary" command to create a diary file, and then list the variables on this file. You can then use your text editor to manipulate the diary file at a later time. The output of the diary includes the matlab commands used during the session. To turn the diary on, you simply enter a command of the form:
To turn the diary off, just enter the command:
When using this method, you have some control the output format with the "format" command. See "help format" for more details.
|
|
|