赞
踩
matlab在使用Live Script时,显示的运行结果太长,怎么实现自动换行?
目前的版本不支持,以后可能会增加自动换行功能。
但是导出时可以先转成普通脚本.m格式,然后使用publish功能,对于过长的结果显示会进行换行处理:
https://www.mathworks.com/help/matlab/matlab_prog/publishing-matlab-code.html
however,发布和共享MATLAB代码
MATLAB®提供了向他人展示您的代码的选项。 您可以发布MATLAB代码文件(.m)以创建格式化的文档,也可以在实时编辑器中创建和共享实时脚本和实时功能。
在实时编辑器中创建和共享实时脚本
创建包含可执行MATLAB代码,嵌入式输出和格式化文本的内聚,可共享文档的最简单方法是使用实时编辑器。 支持的输出格式包括:MLX,PDF,Microsoft®Word,HTML和LaTeX。 有关详细信息,请参见“实时编辑器”中的“创建实时脚本”。
要使用MATLAB代码文件(.m)创建可共享的文档,可以发布文件。 发布MATLAB代码文件将创建一个格式化的文档,其中包括您的代码,注释和输出。 发布代码的常见原因是与他人共享文档以进行教学或演示,或生成代码的可读的外部文档。
此代码演示了方波的傅立叶级数展开,仅仅只是为了表现而已,具体先不去追究。
I set the font used to display codes in settings, and it works for the normal editor and command window. However, it does not modify the fonts used in Live Editor. Is there a way to change that as of R2017b? Thanks!!
Hi there,
Unfortunately as of R2017b, the Live Editor does not honor changes to font preferences, so it is not possible to change the font.
This feature might be added in an upcoming release, but for now, as a workaround, you can change just the font size by using browser-zoom (Ctrl-plus and Ctrl-minus, or Ctrl-mousewheel) to zoom in on the Live Editor.
原始对话如上。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。