Home > classes > @ao > cat.m

cat

PURPOSE ^

CAT concatonate AOs into a vector.

SYNOPSIS ^

function b = cat(varargin)

DESCRIPTION ^

 CAT concatonate AOs into a vector.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: CAT concatonate AOs into a vector.

 CALL:        a = cat(a1, a2)

 VERSION:     $Id: cat.m,v 1.4 2007/06/22 08:32:49 ingo Exp $

 The following call returns a parameter list object that contains the
 default parameter values:

 >> pl = cat(ao, 'Params')

 HISTORY: 27-03-07 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function b = cat(varargin)
0002 % CAT concatonate AOs into a vector.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: CAT concatonate AOs into a vector.
0007 %
0008 % CALL:        a = cat(a1, a2)
0009 %
0010 % VERSION:     $Id: cat.m,v 1.4 2007/06/22 08:32:49 ingo Exp $
0011 %
0012 % The following call returns a parameter list object that contains the
0013 % default parameter values:
0014 %
0015 % >> pl = cat(ao, 'Params')
0016 %
0017 % HISTORY: 27-03-07 M Hewitson
0018 %             Creation
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 
0022 %% Check if this is a call for parameters
0023 if nargin == 2
0024   if isa(varargin{1}, 'ao') && ischar(varargin{2})
0025     in = char(varargin{2});
0026     if strcmp(in, 'Params')
0027       b = getDefaultPL();
0028       return
0029     end
0030   end
0031 end
0032 
0033 %% capture input variable names
0034 invars = {};
0035 for j=1:nargin
0036   iname = inputname(j);
0037   if isempty(iname) & isnumeric(varargin{j})
0038     iname = num2str(varargin{j});
0039   elseif isempty(iname) & ischar(varargin{j})
0040     iname = varargin{j};
0041   end
0042   invars = [invars cellstr(iname)];
0043 end
0044 
0045 b = [];
0046 for j=1:nargin
0047   if isa(varargin{j}, 'ao')
0048     b = [b varargin{j}];
0049   end
0050 end
0051 
0052 %% Get default params
0053 function pl_default = getDefaultPL()
0054 
0055 disp('* creating default plist...');
0056   pl_default = plist();
0057 disp('* done.');
0058 
0059 
0060 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003