Home > classes > @ao > mux.m

mux

PURPOSE ^

MUX concatenate AOs into a vector.

SYNOPSIS ^

function b = mux(varargin)

DESCRIPTION ^

 MUX concatenate AOs into a vector.

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

 DESCRIPTION: MUX concatenate AOs into a vector.

 CALL:        ao_vec = mux(a1 ,a2);

 VERSION:     $Id: mux.html,v 1.14 2008/03/31 10:27:34 hewitson Exp $

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

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

 The following call returns a string that contains the routine CVS version:

 >> version = mux(ao,'Version')

 The following call returns a string that contains the routine category:

 >> category = mux(ao,'Category')

 HISTORY: 27-03-07 M Hewitson
             Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function b = mux(varargin)
0002 % MUX concatenate AOs into a vector.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: MUX concatenate AOs into a vector.
0007 %
0008 % CALL:        ao_vec = mux(a1 ,a2);
0009 %
0010 % VERSION:     $Id: mux.html,v 1.14 2008/03/31 10:27:34 hewitson Exp $
0011 %
0012 % The following call returns a parameter list object that contains the
0013 % default parameter values:
0014 %
0015 % >> pl = mux(ao, 'Params')
0016 %
0017 % The following call returns a string that contains the routine CVS version:
0018 %
0019 % >> version = mux(ao,'Version')
0020 %
0021 % The following call returns a string that contains the routine category:
0022 %
0023 % >> category = mux(ao,'Category')
0024 %
0025 % HISTORY: 27-03-07 M Hewitson
0026 %             Creation
0027 %
0028 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0029 
0030 VERSION = '$Id: mux.html,v 1.14 2008/03/31 10:27:34 hewitson Exp $';
0031 CATEGORY = 'Helper';
0032 
0033 %% Check if this is a call for parameters
0034 if nargin == 2
0035   if isa(varargin{1}, 'ao') && ischar(varargin{2})
0036     in = char(varargin{2});
0037     if strcmp(in, 'Params')
0038       b = getDefaultPL();
0039       return
0040     elseif strcmp(in, 'Version')
0041       b = VERSION;
0042       return
0043     elseif strcmp(in, 'Category')
0044       b = CATEGORY;
0045       return
0046     end
0047   end
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();

Generated on Mon 31-Mar-2008 12:20:24 by m2html © 2003