Home > classes > @ao > cat.m

cat

PURPOSE ^

CAT concatenate AOs into a vector.

SYNOPSIS ^

function varargout = cat(varargin)

DESCRIPTION ^

 CAT concatenate AOs into a vector.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: CAT concatenate AOs into a vector.

 CALL:        a = cat(a1, a2)

 REMARK:      This method is a transparent method, and doesn't add history.

 M-FILE INFO: Get information about this methods by calling
              >> ao.getInfo('cat')

              Get information about a specified set-plist by calling:
              >> ao.getInfo('cat', 'None')

 VERSION:     $Id: cat.m,v 1.14 2008/09/05 11:05:28 ingo Exp $

 HISTORY:     27-03-07 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % CAT concatenate AOs into a vector.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: CAT concatenate AOs into a vector.
0005 %
0006 % CALL:        a = cat(a1, a2)
0007 %
0008 % REMARK:      This method is a transparent method, and doesn't add history.
0009 %
0010 % M-FILE INFO: Get information about this methods by calling
0011 %              >> ao.getInfo('cat')
0012 %
0013 %              Get information about a specified set-plist by calling:
0014 %              >> ao.getInfo('cat', 'None')
0015 %
0016 % VERSION:     $Id: cat.m,v 1.14 2008/09/05 11:05:28 ingo Exp $
0017 %
0018 % HISTORY:     27-03-07 M Hewitson
0019 %                 Creation
0020 %
0021 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0022 
0023 function varargout = cat(varargin)
0024 
0025   % Check if this is a call for parameters
0026   if utils.helper.isinfocall(varargin{:})
0027     varargout{1} = getInfo(varargin{3});
0028     return
0029   end
0030 
0031   import utils.const.*
0032   utils.helper.msg(msg.MNAME, 'running %s/%s', mfilename('class'), mfilename);
0033   
0034   % Collect input variable names
0035   in_names = cell(size(varargin));
0036   for ii = 1:nargin,in_names{ii} = inputname(ii);end
0037 
0038   % Collect all AOs and plists
0039   as  = utils.helper.collect_objects(varargin(:), 'ao', in_names);
0040 
0041   % Decide on a deep copy or a modify
0042   bs = copy(as, nargout);
0043 
0044   % Set output
0045   if nargout == 0
0046     error('### cat cannot be used as a modifier. Please give an output variable.');
0047   else
0048     varargout{1} = bs;
0049   end
0050 end
0051 
0052 %--------------------------------------------------------------------------
0053 % Get Info Object
0054 %--------------------------------------------------------------------------
0055 function ii = getInfo(varargin)
0056   if nargin == 1 && strcmpi(varargin{1}, 'None')
0057     sets = {};
0058     pl   = [];
0059   else
0060     sets = {'Default'};
0061     pl   = getDefaultPlist;
0062   end
0063   % Build info object
0064   ii = minfo(mfilename, 'ao', '', utils.const.categories.helper, '$Id: cat.m,v 1.14 2008/09/05 11:05:28 ingo Exp $', sets, pl);
0065 end
0066 
0067 %--------------------------------------------------------------------------
0068 % Get Default Plist
0069 %--------------------------------------------------------------------------
0070 function pl_default = getDefaultPlist()
0071   pl_default = plist();
0072 end
0073 
0074

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003