Home > classes > @ao > tan.m

tan

PURPOSE ^

TAN overloads the tan method for Analysis objects.

SYNOPSIS ^

function varargout = tan (varargin)

DESCRIPTION ^

 TAN overloads the tan method for Analysis objects.

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

 DESCRIPTION: TAN overloads the tan operator for Analysis objects.

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

 PARAMETERS:  see help for data2D/applymethod for additional parameters

 The following call returns an info object for this method.

 >> info = ao.getInfo('tan')

 VERSION: $Id: tan.m,v 1.15 2008/09/05 11:05:29 ingo Exp $

 HISTORY: 07-05-2007 Diepholz
             Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % TAN overloads the tan method for Analysis objects.
0002 %
0003 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0004 %
0005 % DESCRIPTION: TAN overloads the tan operator for Analysis objects.
0006 %
0007 % CALL: ao_out = tan(ao_in);
0008 %       ao_out = tan(ao_in, pl);
0009 %       ao_out = tan(ao1, pl1, ao_vector, ao_matrix, pl2);
0010 %
0011 % PARAMETERS:  see help for data2D/applymethod for additional parameters
0012 %
0013 % The following call returns an info object for this method.
0014 %
0015 % >> info = ao.getInfo('tan')
0016 %
0017 % VERSION: $Id: tan.m,v 1.15 2008/09/05 11:05:29 ingo Exp $
0018 %
0019 % HISTORY: 07-05-2007 Diepholz
0020 %             Creation
0021 %
0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 
0024 
0025 function varargout = tan (varargin)
0026   %% Check if this is a call for parameters
0027   if utils.helper.isinfocall(varargin{:})
0028     varargout{1} = getInfo(varargin{3});
0029     return
0030   end
0031 
0032   % Collect input variable names
0033   in_names = cell(size(varargin));
0034   for ii = 1:nargin,in_names{ii} = inputname(ii);end
0035 
0036   % Collect all AOs
0037   [as, ao_invars] = utils.helper.collect_objects(varargin(:), 'ao', in_names);
0038   pl              = utils.helper.collect_objects(varargin(:), 'plist', in_names);
0039 
0040   % Decide on a deep copy or a modify
0041   bs = copy(as, nargout);
0042 
0043   % Combine plists
0044   pl = combine(pl, getDefaultPlist);
0045 
0046   % Apply method to all AOs
0047   applymethod(bs, ao_invars, 'tan', pl, getDefaultPlist, getInfo);
0048 
0049   % Reshape the ouput to the same size of the input
0050   varargout{1} = bs;
0051 end
0052 
0053 %--------------------------------------------------------------------------
0054 % Get Info Object
0055 %--------------------------------------------------------------------------
0056 function ii = getInfo(varargin)
0057   if nargin == 1 && strcmpi(varargin{1}, 'None')
0058     sets = {};
0059     pl   = [];
0060   else
0061     sets = {'Default'};
0062     pl   = getDefaultPlist;
0063   end
0064   % Build info object
0065   ii = minfo(mfilename, 'ao', '', utils.const.categories.trig, '$Id: tan.m,v 1.15 2008/09/05 11:05:29 ingo Exp $', sets, pl);
0066 end
0067 
0068 %--------------------------------------------------------------------------
0069 % Get Default Plist
0070 %--------------------------------------------------------------------------
0071 function pl_default = getDefaultPlist()
0072   pl_default = plist('axis', 'y');
0073 end
0074 % END

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