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.5 2007/10/23 16:30:44 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.5 2007/10/23 16:30:44 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 VERSION = '$Id: cat.m,v 1.5 2007/10/23 16:30:44 ingo Exp $';
0023 
0024 %% Check if this is a call for parameters
0025 if nargin == 2
0026   if isa(varargin{1}, 'ao') && ischar(varargin{2})
0027     in = char(varargin{2});
0028     if strcmp(in, 'Params')
0029       b = getDefaultPL();
0030       return
0031     elseif strcmp(in, 'Version')
0032       b = VERSION;
0033       return
0034     end
0035   end
0036 end
0037 
0038 %% capture input variable names
0039 invars = {};
0040 for j=1:nargin
0041   iname = inputname(j);
0042   if isempty(iname) & isnumeric(varargin{j})
0043     iname = num2str(varargin{j});
0044   elseif isempty(iname) & ischar(varargin{j})
0045     iname = varargin{j};
0046   end
0047   invars = [invars cellstr(iname)];
0048 end
0049 
0050 b = [];
0051 for j=1:nargin
0052   if isa(varargin{j}, 'ao')
0053     b = [b varargin{j}];
0054   end
0055 end
0056 
0057 %% Get default params
0058 function pl_default = getDefaultPL()
0059 
0060   pl_default = plist();
0061 
0062 
0063 % END

Generated on Fri 02-Nov-2007 19:39:27 by m2html © 2003