更新时间:2023-12-05 08:13:28
解决此问题的一种方法是在命令输出中显示html代码(已记录为
One way to address this problem is by displaying html code in the command output (documented here).
在您的示例中,代码如下所示:
In your example, the code would look like this:
breaks(1).name = 'This is section break 1.';
breaks(2).name = 'This is section break 2.';
for ix = 1 : numel(breaks)
disp(['<html><h2>' breaks(ix).name '</h2></html>']);
fprintf('Some random processing associated with break %d.\n', ix);
end
当您要使结果以自定义布局(例如表格)显示时,此功能非常有用.而且它避免了获得Matlab报告生成器许可证的需要...
This is incredibly useful when you want to get results to be displayed with a custom layout, such as a table. And it avoids the need of having a Matlab Report Generator license...