How to append a variable to a .mat file?
12,684
If you look at the save()
function documentation, there is a form of the save command that might help:
save(filename, ..., '-append')
The help for this form says:
save(filename, ..., '-append')
adds new variables to an existing file. You can specify the '-append' option with additional inputs such as variables, '-struct' , format, or version.
Comments
-
jhlu87 almost 2 years
If I already have a
.mat
file with the variablesx
andy
, is there a way to use thesave
command to add another variablez
to the.mat
file without having to explicitly state the variablesx
andy
in the save command?