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).
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{:});