Home > marsbar > mars_get_option.m

mars_get_option

PURPOSE ^

Get option subfield as named by ``varargin``.

SYNOPSIS ^

function optval = mars_get_option(varargin)

DESCRIPTION ^

 Get option subfield as named by ``varargin``.

 FORMAT optval = mars_get_option(varargin)

 Tries to get base default if option is not set.  Returns empty matrix if
 there is no information for this option (for example, if the option fields
 were mis-spelled).

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function optval = mars_get_option(varargin)
0002 % Get option subfield as named by ``varargin``.
0003 %
0004 % FORMAT optval = mars_get_option(varargin)
0005 %
0006 % Tries to get base default if option is not set.  Returns empty matrix if
0007 % there is no information for this option (for example, if the option fields
0008 % were mis-spelled).
0009 mars = mars_struct('getifthere', spm('getglobal','MARS'), 'OPTIONS');
0010 if isempty(mars)
0011   mars = mars_options('basedefaults');
0012 end
0013 optval = mars_struct('getifthere', mars, varargin{:});

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019