Home > classes > @ao > sin.m

sin

PURPOSE ^

SIN overloads the sin method for Analysis objects.

SYNOPSIS ^

function varargout = sin (varargin)

DESCRIPTION ^

 SIN overloads the sin method for Analysis objects.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: SIN overloads the sin operator for Analysis objects.

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

 PARAMETERS:  see help for data2D/applymethod for additional parameters

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

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

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

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