


MUX concatenate params into a vector.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: MUX concatenate params into a vector.
CALL: param_vec = mux(p1, p2);
M-FILE INFO: Get information about this methods by calling
>> param.getInfo('mux')
Get information about a specified set-plist by calling:
>> param.getInfo('mux', 'set')
VERSION: $Id: mux.m,v 1.9 2008/07/11 13:22:20 ingo Exp $
HISTORY: 27-03-2007 M Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


0001 % MUX concatenate params into a vector. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: MUX concatenate params into a vector. 0005 % 0006 % CALL: param_vec = mux(p1, p2); 0007 % 0008 % M-FILE INFO: Get information about this methods by calling 0009 % >> param.getInfo('mux') 0010 % 0011 % Get information about a specified set-plist by calling: 0012 % >> param.getInfo('mux', 'set') 0013 % 0014 % VERSION: $Id: mux.m,v 1.9 2008/07/11 13:22:20 ingo Exp $ 0015 % 0016 % HISTORY: 27-03-2007 M Hewitson 0017 % Creation 0018 % 0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 0021 function varargout = mux(varargin) 0022 0023 %%% Check if this is a call for parameters 0024 if utils.helper.isinfocall(varargin{:}) 0025 varargout{1} = getInfo(varargin{3}); 0026 return 0027 end 0028 0029 objs = utils.helper.collect_objects(varargin(:), 'param'); 0030 0031 p_list = []; 0032 for ii = 1:numel(objs) 0033 %%% decide whether we modify the first plist, or create a new one. 0034 objs(ii) = copy(objs(ii), nargout); 0035 0036 p_list = [p_list objs(ii)]; 0037 end 0038 0039 varargout{1} = p_list; 0040 0041 end 0042 0043 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0044 % Local Functions % 0045 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0046 0047 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0048 % 0049 % FUNCTION: getInfo 0050 % 0051 % DESCRIPTION: Get Info Object 0052 % 0053 % HISTORY: 11-07-07 M Hewitson 0054 % Creation. 0055 % 0056 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0057 0058 function ii = getInfo(varargin) 0059 if nargin == 1 && strcmpi(varargin{1}, 'None') 0060 sets = {}; 0061 pl = []; 0062 else 0063 sets = {'Default'}; 0064 pl = getDefaultPlist; 0065 end 0066 % Build info object 0067 ii = minfo(mfilename, 'param', '', 'Helper', '$Id: mux.m,v 1.9 2008/07/11 13:22:20 ingo Exp $', sets, pl); 0068 end 0069 0070 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0071 % 0072 % FUNCTION: getDefaultPlist 0073 % 0074 % DESCRIPTION: Get Default Plist 0075 % 0076 % HISTORY: 11-07-07 M Hewitson 0077 % Creation. 0078 % 0079 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0080 0081 function plo = getDefaultPlist() 0082 plo = plist(); 0083 end 0084