SETZUNITS Set the property 'zunits'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Set the property 'zunits'. CALL: obj.setZunits('units'); obj = obj.setZunits('units'); create copy of the object INPUTS: obj - must be a single data2D object. units - symbol-object or a valid string which can be transform into a symbolic-object. M-FILE INFO: Get information about this methods by calling >> fsdata.getInfo('setZunits') Get information about a specified set-plist by calling: >> fsdata.getInfo('setZunits', 'None') VERSION: $Id: setZunits.m,v 1.2 2008/09/04 15:29:30 ingo Exp $ HISTORY: 27-05-2008 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % SETZUNITS Set the property 'zunits'. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: Set the property 'zunits'. 0005 % 0006 % CALL: obj.setZunits('units'); 0007 % obj = obj.setZunits('units'); create copy of the object 0008 % 0009 % INPUTS: obj - must be a single data2D object. 0010 % units - symbol-object or a valid string which can be transform 0011 % into a symbolic-object. 0012 % 0013 % M-FILE INFO: Get information about this methods by calling 0014 % >> fsdata.getInfo('setZunits') 0015 % 0016 % Get information about a specified set-plist by calling: 0017 % >> fsdata.getInfo('setZunits', 'None') 0018 % 0019 % VERSION: $Id: setZunits.m,v 1.2 2008/09/04 15:29:30 ingo Exp $ 0020 % 0021 % HISTORY: 27-05-2008 Diepholz 0022 % Creation 0023 % 0024 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0025 0026 function varargout = setZunits(varargin) 0027 0028 %%% Check if this is a call for parameters 0029 if utils.helper.isinfocall(varargin{:}) 0030 varargout{1} = getInfo(varargin{3}); 0031 return 0032 end 0033 0034 obj = varargin{1}; 0035 val = varargin{2}; 0036 0037 %%% decide whether we modify the pz-object, or create a new one. 0038 obj = copy(obj, nargout); 0039 0040 %%% set 'zunits' 0041 if ischar(val) 0042 obj.zunits = sym(val); 0043 else 0044 obj.zunits = val; 0045 end 0046 0047 varargout{1} = obj; 0048 end 0049 0050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0051 % Local Functions % 0052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0053 0054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0055 % 0056 % FUNCTION: getInfo 0057 % 0058 % DESCRIPTION: Get Info Object 0059 % 0060 % HISTORY: 11-07-07 M Hewitson 0061 % Creation. 0062 % 0063 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0064 0065 function ii = getInfo(varargin) 0066 if nargin == 1 && strcmpi(varargin{1}, 'None') 0067 sets = {}; 0068 pl = []; 0069 else 0070 sets = {'Default'}; 0071 pl = getDefaultPlist; 0072 end 0073 % Build info object 0074 ii = minfo(mfilename, 'data2D', '', utils.const.categories.internal, '$Id: setZunits.m,v 1.2 2008/09/04 15:29:30 ingo Exp $', sets, pl); 0075 end 0076 0077 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0078 % 0079 % FUNCTION: getDefaultPlist 0080 % 0081 % DESCRIPTION: Get Default Plist 0082 % 0083 % HISTORY: 11-07-07 M Hewitson 0084 % Creation. 0085 % 0086 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0087 0088 function plo = getDefaultPlist() 0089 plo = plist('zunits', sym('empty')); 0090 end 0091