comparison m-toolbox/classes/@param/getOptions.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % GETOPTIONS returns the array of options for the param
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: GETOPTIONS returns the array of options for the param
5 %
6 % CALL: val = getOptions(param);
7 %
8 %
9 % VERSION: $Id: getOptions.m,v 1.2 2011/02/22 15:42:02 hewitson Exp $
10 %
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12
13 function varargout = getOptions(varargin)
14
15 pin = varargin{1};
16
17 if numel(pin) ~= 1 || nargin ~= 1
18 error('### This method works only with one param object.');
19 end
20
21 if isa(pin.val, 'paramValue')
22 varargout{1} = pin.val.getOptions;
23 else
24 varargout{1} = {pin.val};
25 end
26 end