Home > classes > @cdata > setXY.m

setXY

PURPOSE ^

SETXY Set the property 'xy'.

SYNOPSIS ^

function varargout = setXY(varargin)

DESCRIPTION ^

 SETXY Set the property 'xy'.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: Set the property 'xy'.

 CALL:              obj.setXY([1 2 3], [1 2 3]);
              obj = obj.setXY([1 2 3], [1 2 3]); create copy of the object

 INPUTS:      obj - must be a single cdata object.

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

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

 VERSION:     $Id: setXY.m,v 1.1 2008/08/04 17:02:02 ingo Exp $

 HISTORY:     27-05-2008 Diepholz
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % SETXY Set the property 'xy'.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: Set the property 'xy'.
0005 %
0006 % CALL:              obj.setXY([1 2 3], [1 2 3]);
0007 %              obj = obj.setXY([1 2 3], [1 2 3]); create copy of the object
0008 %
0009 % INPUTS:      obj - must be a single cdata object.
0010 %
0011 % M-FILE INFO: Get information about this methods by calling
0012 %              >> fsdata.getInfo('setXY')
0013 %
0014 %              Get information about a specified set-plist by calling:
0015 %              >> fsdata.getInfo('setXY', 'None')
0016 %
0017 % VERSION:     $Id: setXY.m,v 1.1 2008/08/04 17:02:02 ingo Exp $
0018 %
0019 % HISTORY:     27-05-2008 Diepholz
0020 %                 Creation
0021 %
0022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0023 
0024 function varargout = setXY(varargin)
0025 
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   obj = varargin{1};
0033   x   = varargin{2};
0034   y   = varargin{3};
0035 
0036   %%% decide whether we modify the pz-object, or create a new one.
0037   obj = copy(obj, nargout);
0038 
0039   %%% set 'x' and 'y'
0040   obj.x = x;
0041   obj.y = y;
0042 
0043   varargout{1} = obj;
0044 end
0045 
0046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0047 %                               Local Functions                               %
0048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0049 
0050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0051 %
0052 % FUNCTION:    getInfo
0053 %
0054 % DESCRIPTION: Get Info Object
0055 %
0056 % HISTORY:     11-07-07 M Hewitson
0057 %                Creation.
0058 %
0059 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0060 
0061 function ii = getInfo(varargin)
0062   if nargin == 1 && strcmpi(varargin{1}, 'None')
0063     sets = {};
0064     pl   = [];
0065   else
0066     sets = {'Default'};
0067     pl   = getDefaultPlist;
0068   end
0069   % Build info object
0070   ii = minfo(mfilename, 'cdata', '', 'Internal', '$Id: setXY.m,v 1.1 2008/08/04 17:02:02 ingo Exp $', sets, pl);
0071 end
0072 
0073 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0074 %
0075 % FUNCTION:    getDefaultPlist
0076 %
0077 % DESCRIPTION: Get Default Plist
0078 %
0079 % HISTORY:     11-07-07 M Hewitson
0080 %                Creation.
0081 %
0082 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0083 
0084 function plo = getDefaultPlist()
0085   plo = plist('xy', '');
0086 end
0087

Generated on Wed 27-Aug-2008 13:30:29 by m2html © 2003