Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MATLAB feature function

I'm curious where to find a complete description of FEATURE function? Which arguments it accepts? No documentation was found. I heard only about memstats and getpid. Anything else?

>> which feature
built-in (undocumented)
like image 525
yuk Avatar asked Apr 23 '10 18:04

yuk


2 Answers

Note: A more complete list of features, explanations and references can be found here: http://UndocumentedMatlab.com/blog/undocumented-feature-function/

feature is an entirely undocumented and unsupported Matlab function, and unlike most other undocumented Matlab functions it actually does often change without prior notice between Matlab releases, so be very careful when using this function in your code.

Having said that, several feature options have been reported over the years, mainly on the CSSM forum and also seen in the installed Matlab code base:

feature accepts two arguments: the name of the feature and an optional new value. This is similar to get/set functions: If only one argument is supplied, Matlab returns the current feature value (like get), otherwise the value is modified (like set).

  • feature('usehg2',1) - this apparently relates to a new Handle-Graphics implementation that is currently under development (for the past few releases) - if anyone has any information about HG2 I would love to hear it...

  • feature('JavaFigures') - mentioned in propedit.m; disabled since R2007a when native (non-Java) Matlab figures were disabled.

  • feature('NewPrintAPI') - mentioned in \toolbox\matlab\graphics\private\setup.m

  • feature('accel’,’on/off’) - see here

  • feature('getpid') - returns the Matlab process ID (well, actually the PID of its JVM but that's the same PID as Matlab's). Also see the similar java.lang.management.ManagementFactory.getRuntimeMXBean.getName.char.

  • feature('NumCores') - returns the number of CPU cores seen by Matlab

  • feature(memstats, dumpmem, processmem, ...) - multiple online references

  • feature('hotlinks') – see toolbox\matlab\helptools\info.m

  • feature('UseOldFileDialogs') – see toolbox\matlab\uitools\private\usejavadialog.m

  • feature('timing')

    • cpucount = feature('timing','cpucount') – see toolbox\matlab\iofun\tempname.m (several other 2nd arg options)
  • feature('DefaultCharacterSet') - see here

And here are a few more references taken from the installed R2010a Matlab code base:

  • feature('useGBT2') – "feature('useGBT2') is only available when Matlab is started with -hgVersion 2 option." - In /ja/xlate:15419; also see in: clf.m

  • feature('COM_ActxProgidCheck',flag) - /help/techdoc/helpsearch/_533.cfs

  • feature('TimeSeriesTools',1) - /help/techdoc/helpsearch/_533.cfs

  • feature('launch_activation', 'forcecheck') – /toolbox/local/StudentActivationStatus.m

  • feature('HGUsingMatlabClasses') – /toolbox/local/hgrc.m, subplot.m, title.m, xlabel.m, ylabel.m, zlabel.m, mesh.m, surf.m, colorbar.m etc. etc.

  • feature('EightyColumns',1) - /toolbox/local/matlabrc.m

  • feature('GetSharedLibExt') - /toolbox/matlab/audiovideo/private/privateMMReaderPluginSearch.m

  • feature('locale') - mlint.m, mtree.m, helpmenufcn.m

  • feature('clearjava',1) - javaclasspath.m

  • feature('figuretools') – domymenu.m

  • feature('getdefaultprinter') – printdlg.m:578

  • feature('ShowFigureWindows') – printjob.m, printtables.m, /toolbox/matlab/graphics/private/warnfiguredialog.m

  • feature('SearchUDDClassesForHelp') - /toolbox/matlab/helptools/+helpUtils/@HelpProcess/getHelpText.m

  • feature('Automationserver') - notebook.m, enableservice.m = enableservice('AutomationServer', true)

  • feature('EnableDDE',flag) – enableservice.m = enableservice('DDEServer', true)

The following are OpenGL-related features that are used in opengl.m function:

  • feature('openglmode')
  • feature('OpenGLLoadStatus')
  • feature('UseMesaSoftwareOpenGL',1)- unix only
  • feature('usegenericopengl',1)
  • feature('getopenglinfo') = opengl('info')
  • feature('getopengldata') = opengl('data')
  • feature('OpenGLVerbose',1)
like image 180
Yair Altman Avatar answered Sep 18 '22 13:09

Yair Altman


This MathWorks product support page lists a few other ways FEATURE can be used under this section about tools for measuring memory usage:

feature dumpmem
feature processmem

Aside from that, I've only been able to find out that it takes up to 2 inputs and returns 1 output:

>> nargin(@feature)

ans =

     2

>> nargout(@feature)

ans =

     1
like image 25
gnovice Avatar answered Sep 17 '22 13:09

gnovice