comparison m-toolbox/classes/@ao/exp.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % EXP overloads the exp operator for analysis objects. Exponential.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: EXP overloads the exp operator for analysis objects. Exponential.
5 % EXP(ao) is the exponential of the elements of ao.data
6 % e to the ao.data.
7 %
8 % CALL: ao_out = exp(ao_in);
9 % ao_out = exp(ao_in, pl);
10 % ao_out = exp(ao1, pl1, ao_vector, ao_matrix, pl2);
11 %
12 % POSSIBLE VALUES: ao_in = [ao2 ao3]
13 % ao_in = ao_vector
14 % ao_in = ao_matrix
15 %
16 % <a href="matlab:utils.helper.displayMethodInfo('ao', 'exp')">Parameters Description</a>
17 %
18 % VERSION: $Id: exp.m,v 1.42 2011/04/17 10:30:25 hewitson Exp $
19 %
20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
22 function varargout = exp(varargin)
23
24 % Check if the method was called by another method
25 callerIsMethod = utils.helper.callerIsMethod;
26
27 % Settings
28 operatorName = 'exp';
29 dxFcn = @(x,dx)abs(exp(x)).*dx;
30
31 if callerIsMethod
32 in_names = {};
33 else
34 % Collect input variable names
35 in_names = cell(size(varargin));
36 for ii = 1:nargin,in_names{ii} = inputname(ii);end
37 end
38
39 copyObjects = nargout>0;
40 [bs, pl] = ao.applymethod(copyObjects, callerIsMethod, in_names, operatorName, dxFcn, @getInfo, @getDefaultPlist, varargin{:});
41
42 if isa(bs, 'ao')
43 % Set units
44 setUnitsForAxis(bs, pl, '');
45 end
46
47 % set outputs
48 varargout = utils.helper.setoutputs(nargout, bs);
49
50 end
51
52 %--------------------------------------------------------------------------
53 % Get Info Object
54 %--------------------------------------------------------------------------
55 function ii = getInfo(varargin)
56
57 ii = minfo.getInfoAxis(mfilename, @getDefaultPlist, varargin);
58 end
59
60 %--------------------------------------------------------------------------
61 % Get Default Plist
62 %--------------------------------------------------------------------------
63
64 function plout = getDefaultPlist(varargin)
65 plout = plist.getDefaultAxisPlist(varargin{:});
66 end
67