How to redirect Matlab output of a command to a file? [duplicate]

旧时模样 提交于 2019-12-02 04:30:30

Have a look at the diary function. E.g.

diary my_file.txt
s1
diary off

The file my_file.txt will then contain exactly what you see on screen.

If you need to do it more fine grained there is the evalc function that will store the output to a string.

Later you can output the string into any output channel matlab offers.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!