【发布时间】:2025-12-13 05:25:01
【问题描述】:
我很好奇在哪里可以找到 FEATURE 功能的完整说明?它接受哪些论点?未找到任何文档。我只听说过memstats 和getpid。还有什么?
>> which feature
built-in (undocumented)
【问题讨论】:
我很好奇在哪里可以找到 FEATURE 功能的完整说明?它接受哪些论点?未找到任何文档。我只听说过memstats 和getpid。还有什么?
>> which feature
built-in (undocumented)
【问题讨论】:
注意:更完整的功能、解释和参考列表可以在这里找到:http://UndocumentedMatlab.com/blog/undocumented-feature-function/
feature 是一个完全未记录且不受支持的 Matlab 函数,并且与大多数其他未记录的 Matlab 函数不同,它实际上经常在 Matlab 版本之间更改而不事先通知,所以要非常小心在您的代码中使用此函数时。
话虽如此,多年来已经报道了几个功能选项,主要在 CSSM 论坛上,也可以在已安装的 Matlab 代码库中看到:
feature 接受两个参数:功能名称和可选的新值。这类似于 get/set 函数:如果只提供一个参数,Matlab 返回当前特征值(如 get),否则修改值(如 set)。
feature('usehg2',1) - 这显然与当前正在开发的新 Handle-Graphics 实现有关(对于过去的几个版本) ) - 如果有人有任何关于 HG2 的信息,我很想听听...
feature('JavaFigures') - 在 propedit.m 中提到; disabled since R2007a 当本地(非 Java)Matlab 图形被禁用时。
feature('NewPrintAPI') - 在 \toolbox\matlab\graphics\private\setup.m
功能('accel','on/off') - 见here
feature('getpid') - returns the Matlab process ID(实际上是其 JVM 的 PID,但与 Matlab 的 PID 相同)。另请参阅类似的java.lang.management.ManagementFactory.getRuntimeMXBean.getName.char。
feature('NumCores') - Matlab 看到的returns the number of CPU cores
功能(memstats、dumpmem、processmem,...) - 多个在线参考
功能('热链接') - 参见 toolbox\matlab\helptools\info.m
功能('UseOldFileDialogs') – 参见 toolbox\matlab\uitools\private\usejavadialog.m
功能('计时')
功能('DefaultCharacterSet') - 见here
这里还有一些来自已安装的 R2010a Matlab 代码库的参考:
功能('useGBT2') – "feature('useGBT2') 仅在使用 -hgVersion 2 选项启动 Matlab 时可用。" - 在 /ja/xlate:15419;另见:clf.m
功能('COM_ActxProgidCheck',flag) - /help/techdoc/helpsearch/_533.cfs
功能('TimeSeriesTools',1) - /help/techdoc/helpsearch/_533.cfs
功能('launch_activation', 'forcecheck') – /toolbox/local/StudentActivationStatus.m
功能('HGUsingMatlabClasses') – /toolbox/local/hgrc.m、subplot.m、title.m、xlabel.m、ylabel。 m、zlabel.m、mesh.m、surf.m、colorbar.m 等。
功能('EightyColumns',1) - /toolbox/local/matlabrc.m
功能('GetSharedLibExt') - /toolbox/matlab/audiovideo/private/privateMMReaderPluginSearch.m
功能('locale') - mlint.m、mtree.m、helpmenufcn.m
功能('clearjava',1) - javaclasspath.m
功能('figuretools') – domymenu.m
功能('getdefaultprinter') – printdlg.m:578
功能('ShowFigureWindows') – printjob.m、printtables.m、/toolbox/matlab/graphics/private/warnfiguredialog.m
功能('SearchUDDClassesForHelp') - /toolbox/matlab/helptools/+helpUtils/@HelpProcess/getHelpText.m
功能('Automationserver') - notebook.m, enableservice.m = enableservice ('AutomationServer', true)
以下是 opengl.m 函数中使用的 OpenGL 相关功能:
【讨论】:
This MathWorks product support page 列出了在this section about tools for measuring memory usage 下可以使用 FEATURE 的其他几种方式:
feature dumpmem
feature processmem
除此之外,我只发现它最多需要 2 个输入并返回 1 个输出:
>> nargin(@feature)
ans =
2
>> nargout(@feature)
ans =
1
【讨论】: