MATLAB 代码部分 - 脚本与函数

MATLAB Code Sections - Script vs. Function

在 MATLAB R2014a 和 R2014b 中使用代码段/代码单元/单元模式 (%%) 时(请参阅 these two MathWorks 链接),编辑器中突出显示的部分适用于脚本和函数。
但是,这些部分在当前文件夹的详细信息面板中正确显示 window 仅适用于脚本而不适用于函数,请参见以下两个屏幕截图的左下角:

是否有更改此行为的设置?我非常感谢当前文件夹 window 的详细信息面板中的部分视图,因为它显示了脚本的整体结构并允许轻松导航,我也希望获得功能。

目前似乎没有任何方法可以自定义 Details Panel of the Current Folder browser. It shows you the underlying structure of a file in a way that is specific to the type of file. For scripts it shows the section structure, since sections 是分区脚本的唯一真正方法。

对于函数来说,代码的划分一般是通过将操作分组到子函数中来完成的,所以local function structure in the file is shown (but nested functions, for whatever reason, are not). Additionally, class files will display object properties and methods, while MAT-files会显示它们的变量内容。