GETZ Get the property 'z'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Get the property 'z'. CALL: val = obj.getZ(); val = obj.getZ(idx); val = obj.getZ(1:10); INPUTS: obj - must be a single data2D object. idx - index of the data samples M-FILE INFO: Get information about this methods by calling >> fsdata.getInfo('getZ') Get information about a specified set-plist by calling: >> fsdata.getInfo('getZ', 'None') VERSION: $Id: getZ.m,v 1.2 2008/09/04 15:29:30 ingo Exp $ HISTORY: 27-05-2008 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % GETZ Get the property 'z'. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: Get the property 'z'. 0005 % 0006 % CALL: val = obj.getZ(); 0007 % val = obj.getZ(idx); 0008 % val = obj.getZ(1:10); 0009 % 0010 % INPUTS: obj - must be a single data2D object. 0011 % idx - index of the data samples 0012 % 0013 % M-FILE INFO: Get information about this methods by calling 0014 % >> fsdata.getInfo('getZ') 0015 % 0016 % Get information about a specified set-plist by calling: 0017 % >> fsdata.getInfo('getZ', 'None') 0018 % 0019 % VERSION: $Id: getZ.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 = getZ(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 %%% get idx 0035 idx = []; 0036 if nargin == 2 0037 if isnumeric(varargin{2}) 0038 idx = varargin{2}; 0039 else 0040 error('### Unknown arguments to getZ.'); 0041 end 0042 end 0043 0044 %%% get z values 0045 if isempty(idx) 0046 varargout{1} = varargin{1}.z; 0047 else 0048 varargout{1} = varargin{1}.z(idx); 0049 end 0050 end 0051 0052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0053 % Local Functions % 0054 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0055 0056 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0057 % 0058 % FUNCTION: getInfo 0059 % 0060 % DESCRIPTION: Get Info Object 0061 % 0062 % HISTORY: 11-07-07 M Hewitson 0063 % Creation. 0064 % 0065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0066 0067 function ii = getInfo(varargin) 0068 if nargin == 1 && strcmpi(varargin{1}, 'None') 0069 sets = {}; 0070 pl = []; 0071 else 0072 sets = {'Default'}; 0073 pl = getDefaultPlist; 0074 end 0075 % Build info object 0076 ii = minfo(mfilename, 'data2D', '', utils.const.categories.internal, '$Id: getZ.m,v 1.2 2008/09/04 15:29:30 ingo Exp $', sets, pl); 0077 end 0078 0079 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0080 % 0081 % FUNCTION: getDefaultPlist 0082 % 0083 % DESCRIPTION: Get Default Plist 0084 % 0085 % HISTORY: 11-07-07 M Hewitson 0086 % Creation. 0087 % 0088 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0089 0090 function plo = getDefaultPlist() 0091 plo = plist(); 0092 end 0093