如果我已经有了一个包含变量 x
和 y
的 .mat
文件,有没有办法使用 save
命令将另一个变量 z
添加到 .mat
文件,而无需显式声明变量 x
和 y
在保存命令中?
最佳答案
如果您查看 save()
function documentation ,有一种保存命令的形式可能会有所帮助:
save(filename, ..., '-append')
此表单的帮助说明:
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.
关于matlab - 如何将变量附加到 .mat 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8509315/