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