matlab中判断两个数相等_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-digit ASCII form.

SAVE ... -ASCII -TABS delimits with tabs.

SAVE ... -ASCII -DOUBLE -TABS 16-digit, tab delimited.

MAT Options:

SAVE ... -MAT saves in MAT format regardless of extension.

SAVE ... -V4 saves a MAT-file that MATLAB 4 can LOAD.

SAVE ... -APPEND adds the variables to an existing file (MAT-file only).

When using the -V4 option, variables that incompatible with MATLAB 4 are

not saved to the MAT-file. For example, ND arrays, structs, cells, etc.

cannot be saved to a MATLAB 4 MAT-file. Also, variables with names that

are longer than 19 characters cannot be saved to a MATLAB 4 MAT-file.

Use the functional form of SAVE, such as SAVE('filename','var1','var2'),

when the filename or variable names are stored in strings.

See also LOAD, DIARY, FWRITE, FPRINTF, UISAVE, FILEFORMATS.

◆◆

评论读取中....

请登录后再发表评论!

◆◆

修改失败,请稍后尝试

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值