Home > classes > @ao > exp.m

exp

PURPOSE ^

EXP overloads the exp operator for Analysis objects. Exponential.

SYNOPSIS ^

function varargout = exp (varargin)

DESCRIPTION ^

 EXP overloads the exp operator for Analysis objects. Exponential.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: EXP overloads the exp operator for Analysis objects. Exponential.
              EXP(ao) is the exponential of the elements of ao.data
                      e to the ao.data.

 CALL:        ao_out = exp(ao_in);
              ao_out = exp(ao_in, pl);
              ao_out = exp(ao1, pl1, ao_vector, ao_matrix, pl2);

 POSSIBLE VALUES: ao_in  = [ao2 ao3]
                  ao_in  = ao_vector
                  ao_in  = ao_matrix

 PARAMETERS:  see help for data2D/applymethod for additional parameters

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

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

 VERSION:     $Id: exp.m,v 1.23 2008/09/05 14:11:47 hewitson Exp $

 HISTORY:     23-05-2007 Diepholz
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % EXP overloads the exp operator for Analysis objects. Exponential.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: EXP overloads the exp operator for Analysis objects. Exponential.
0005 %              EXP(ao) is the exponential of the elements of ao.data
0006 %                      e to the ao.data.
0007 %
0008 % CALL:        ao_out = exp(ao_in);
0009 %              ao_out = exp(ao_in, pl);
0010 %              ao_out = exp(ao1, pl1, ao_vector, ao_matrix, pl2);
0011 %
0012 % POSSIBLE VALUES: ao_in  = [ao2 ao3]
0013 %                  ao_in  = ao_vector
0014 %                  ao_in  = ao_matrix
0015 %
0016 % PARAMETERS:  see help for data2D/applymethod for additional parameters
0017 %
0018 % M-FILE INFO: Get information about this methods by calling
0019 %              >> ao.getInfo('exp')
0020 %
0021 %              Get information about a specified set-plist by calling:
0022 %              >> ao.getInfo('exp', 'None')
0023 %
0024 % VERSION:     $Id: exp.m,v 1.23 2008/09/05 14:11:47 hewitson Exp $
0025 %
0026 % HISTORY:     23-05-2007 Diepholz
0027 %                 Creation
0028 %
0029 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0030 
0031 function varargout = exp (varargin)
0032 
0033   % Check if this is a call for parameters
0034   if utils.helper.isinfocall(varargin{:})
0035     varargout{1} = getInfo(varargin{3});
0036     return
0037   end
0038 
0039   % Collect input variable names
0040   in_names = cell(size(varargin));
0041   for ii = 1:nargin,in_names{ii} = inputname(ii);end
0042 
0043   % Collect all AOs
0044   [as, ao_invars] = utils.helper.collect_objects(varargin(:), 'ao', in_names);
0045   pl              = utils.helper.collect_objects(varargin(:), 'plist', in_names);
0046 
0047   % Decide on a deep copy or a modify
0048   bs = copy(as, nargout);
0049 
0050   % Combine plists
0051   pl = combine(pl, getDefaultPlist);
0052 
0053   % Apply method to all AOs
0054   applymethod(bs, ao_invars, 'exp', pl, getDefaultPlist, getInfo);
0055 
0056   % Set units
0057 %   for ii =1:numel(bs)
0058 %     app_axis = pl.find('axis');
0059 %     if ~isempty(find('X'==upper(app_axis), 1))
0060 %       bs(ii).setXunits(feval('exp', bs(ii).data.xunits), 'internal');
0061 %     end
0062 %     if ~isempty(find('Y'==upper(app_axis), 1))
0063 %       bs(ii).setYunits(feval('exp', bs(ii).data.yunits), 'internal');
0064 %     end
0065 %   end
0066 
0067   % Reshape the ouput to the same size of the input
0068   if nargout > 0
0069     varargout{1} = bs;
0070   end
0071 end
0072 
0073 %--------------------------------------------------------------------------
0074 % Get Info Object
0075 %--------------------------------------------------------------------------
0076 function ii = getInfo(varargin)
0077   if nargin == 1 && strcmpi(varargin{1}, 'None')
0078     sets = {};
0079     pl   = [];
0080   else
0081     sets = {'Default'};
0082     pl   = getDefaultPlist;
0083   end
0084   % Build info object
0085   ii = minfo(mfilename, 'ao', '', utils.const.categories.op, '$Id: exp.m,v 1.23 2008/09/05 14:11:47 hewitson Exp $', sets, pl);
0086 end
0087 
0088 %--------------------------------------------------------------------------
0089 % Get Default Plist
0090 %--------------------------------------------------------------------------
0091 function pl_default = getDefaultPlist()
0092   pl_default = plist('axis', 'y');
0093 end
0094

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