本文介绍了如何将命令的Matlab输出重定向到文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将Matlab命令的输出重定向或复制到文件中.我该怎么办?
I want to redirect or copy the output of a Matlab command to a file. How can I do that?
就我而言,我想使用UNIX工具diff比较两个大型结构.
In my case, I have two large structs that I want to compare using the UNIX tool diff.
示例:我可以在Matlab中完成此操作
Example: I can do this in Matlab:
>> s1 s1 = a: 32 abc: 'example' >>并想要一个包含大约:
s1 = a: 32 abc: 'example'这些解决方案不可行:
- 复制动作:无法(舒适地)自动化.
- save -ascii:不适用于结构.
- Copy-pase: can't automate (comfortably).
- save -ascii: does not work with structs.
看看日记功能.例如
diary my_file.txt s1 diary off文件my_file.txt将完全包含您在屏幕上看到的内容.
The file my_file.txt will then contain exactly what you see on screen.
更多推荐
如何将命令的Matlab输出重定向到文件?
发布评论