怎样才能实时的将matlab中worksapce里的数据输出到excel

来源:百度知道 编辑:UC知道 时间:2024/05/23 11:31:41
如题。
楼下的朋友能否说的详细些,我现在正在准备毕业论文,以前没有接触过matlab 可否给个实例,或者完整语句?谢谢!我可以追加你的积分

不用那么复杂。如果要输出的变量不太多的话可打开变量,然后全选,再打开excel文件粘贴即可,很简单。如果比较多的话可以先把变量输出为ASCII(txt)文件,然后在excel中导入。

如要将变量a 存成到当前目录下的b.txt文件,可用:save 'b.txt' a -ascii。还有其它参数可参考matlab 的帮助。

SAVE Save workspace variables to disk.
SAVE FILENAME saves all workspace variables to the binary "MAT-file"
named FILENAME.mat. The data may be retrieved with LOAD. If FILENAME
has no extension, .mat is assumed.

SAVE, by itself, creates the binary "MAT-file" named 'matlab.mat'. It is
an error if 'matlab.mat' is not writable.

SAVE FILENAME X saves only X.
SAVE FILENAME X Y Z saves X, Y, and Z. The wildcard '*' can be used to
save only those variables that match a pattern.

ASCII Options:
SAVE ... -ASCII uses 8-digit ASCII form instead of binary regardless
of file extension.
SAVE ... -ASCII -DOUBLE uses 16-di