
Figure 16: Excel®’s Save As window
The data will be saved in a file with the name: “random_number_data.txt”
that can be loaded in Matlab. If by mistake, you save the file and there is an
entry at cell (A8), then when you attempt to
l
l
o
o
a
a
d
d it you will get an error.
7.2 Saving Text ASCII Files: The
s
s
a
a
v
v
e
e
command
On the very opposite, when you need to save some data in a text file to be
able to access it later either by viewing it with Microsoft® Excel® or by re-
loading to Matlab, the user can use the
s
s
a
a
v
v
e
e command. The general calling
syntax of the
s
s
a
a
v
v
e
e
is of the following form:
“
s
s
a
a
v
v
e
e
filename.ext variable_name options”
If a path is not provided with filename, this command saves the elements of
the variable_name in a file with the complete name filename.ext (where ext
stands for the extension of the filename and for consistency try to always use
.txt) in the current directory. If the scalar/vector/matrix (you cannot save cell
arrays or structures with this command unless first you extract their data in
a matrix or a vector variable) that is located in the workspace under the
Commentaires sur ces manuels