


XZYDATA X-Y-Z data object class constructor.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: XZYDATA X-Y-Z data object class constructor.
Create an X-Y-Z data object.
SUPER CLASSES: data3D < data2D < ltpda_data < ltpda_nuo < ltpda_obj
PROPERTIES:
Inherit Properties (read only)
version - cvs-version string
xunits - units of the y-axis
yunits - units of the y-axis
zunits - units of the z-axis
x - data values of the x-axis
y - data values of the y-axis
z - data values of the z-axis
Possible constructors:
xyz = xyzdata() - creates a blank xyz object
xyz = xyzdata(z) - creates an xyz object with the given
z-data.
xyz = xydata(x,y,z) - creates an xyz object with the given
(x,y,z)-data.
XYDATA METHODS:
Defined Abstract methods:
char - returns one character string which represents the object
copy - copies an object
display - displays an object
update_struct - updates a object structure to the current tbx-version
M-FILE INFO: The following call returns an minfo object that contains
information about the xyzdata constructor:
>> info = xyzdata.getInfo
or >> info = xyzdata.getInfo('xyzdata')
You can get information about class methods by calling:
>> info = xyzdata.getInfo(method)
e.g. >> info = xyzdata.getInfo('eq')
You can also restrict the sets of parameters contained in
the minfo object by calling:
>> info = xyzdata.getInfo(method, set)
e.g. >> info = xyzdata.getInfo('xyzdata', 'Default')
VERSION: $Id: xyzdata.m,v 1.11 2008/08/11 07:25:39 hewitson Exp $
HISTORY: 30-01-2007 Hewitson
Creation
SEE ALSO: tsdata, fsdata, xydata, cdata, data2D, data3D, xyzdata
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


0001 % XZYDATA X-Y-Z data object class constructor. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: XZYDATA X-Y-Z data object class constructor. 0005 % Create an X-Y-Z data object. 0006 % 0007 % SUPER CLASSES: data3D < data2D < ltpda_data < ltpda_nuo < ltpda_obj 0008 % 0009 % PROPERTIES: 0010 % 0011 % Inherit Properties (read only) 0012 % version - cvs-version string 0013 % xunits - units of the y-axis 0014 % yunits - units of the y-axis 0015 % zunits - units of the z-axis 0016 % x - data values of the x-axis 0017 % y - data values of the y-axis 0018 % z - data values of the z-axis 0019 % 0020 % Possible constructors: 0021 % xyz = xyzdata() - creates a blank xyz object 0022 % xyz = xyzdata(z) - creates an xyz object with the given 0023 % z-data. 0024 % xyz = xydata(x,y,z) - creates an xyz object with the given 0025 % (x,y,z)-data. 0026 % 0027 % XYDATA METHODS: 0028 % 0029 % Defined Abstract methods: 0030 % char - returns one character string which represents the object 0031 % copy - copies an object 0032 % display - displays an object 0033 % update_struct - updates a object structure to the current tbx-version 0034 % 0035 % M-FILE INFO: The following call returns an minfo object that contains 0036 % information about the xyzdata constructor: 0037 % >> info = xyzdata.getInfo 0038 % or >> info = xyzdata.getInfo('xyzdata') 0039 % 0040 % You can get information about class methods by calling: 0041 % >> info = xyzdata.getInfo(method) 0042 % e.g. >> info = xyzdata.getInfo('eq') 0043 % 0044 % You can also restrict the sets of parameters contained in 0045 % the minfo object by calling: 0046 % >> info = xyzdata.getInfo(method, set) 0047 % e.g. >> info = xyzdata.getInfo('xyzdata', 'Default') 0048 % 0049 % VERSION: $Id: xyzdata.m,v 1.11 2008/08/11 07:25:39 hewitson Exp $ 0050 % 0051 % HISTORY: 30-01-2007 Hewitson 0052 % Creation 0053 % 0054 % SEE ALSO: tsdata, fsdata, xydata, cdata, data2D, data3D, xyzdata 0055 % 0056 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0057 0058 classdef xyzdata < data3D 0059 0060 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0061 % Property definition % 0062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0063 0064 %---------- Public (read/write) Properties ---------- 0065 properties 0066 end 0067 0068 %---------- Protected read-only Properties ---------- 0069 properties (SetAccess = protected) 0070 end 0071 0072 %---------- Private Properties ---------- 0073 properties (GetAccess = protected, SetAccess = protected) 0074 end 0075 0076 %---------- Abstract Properties ---------- 0077 properties (Abstract = true, SetAccess = protected) 0078 end 0079 0080 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0081 % Check property setting % 0082 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0083 0084 methods 0085 end 0086 0087 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0088 % Constructor % 0089 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0090 0091 methods 0092 function obj = xyzdata(varargin) 0093 0094 % Call data2D constructor since we add no special features here. 0095 obj = obj@data3D(varargin{:}); 0096 0097 %%%%%%%%%% Set dafault values %%%%%%%%%% 0098 %%% Exept for a struct as an input 0099 if ~(nargin == 1 && isstruct(varargin{1})) 0100 % set version 0101 obj.setVersion('$Id: xyzdata.m,v 1.11 2008/08/11 07:25:39 hewitson Exp $'); 0102 end 0103 0104 if nargin == 0 0105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0106 %%%%%%%%%%%%%%%%%%%%%%%%%%%% no inputs %%%%%%%%%%%%%%%%%%%%%%%%%%%% 0107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0108 0109 elseif nargin == 1 0110 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0111 %%%%%%%%%%%%%%%%%%%%%%%%%%%% one input %%%%%%%%%%%%%%%%%%%%%%%%%%%% 0112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0113 0114 if isa(varargin{1}, 'xyzdata') 0115 %%%%%%%%%% xy = xydata(xydata) %%%%%%%%%% 0116 obj = copy(varargin{1}, 1); 0117 0118 elseif isstruct(varargin{1}) 0119 %%%%%%%%%% data = xyzdata(struct) %%%%%%%%%% 0120 0121 %%% Do nothing. Because no properties are defined in this class. 0122 0123 elseif isnumeric(varargin{1}) && length(varargin{1}) > 1 0124 %%%%%%%%%% xyz = xyzdata(z_vector) %%%%%%%%%% 0125 obj.x = 1:size(varargin{1}, 1); 0126 obj.y = 1:size(varargin{1}, 2); 0127 obj.z = varargin{1}; 0128 0129 elseif isa(varargin{1}, 'plist') 0130 %%%%%%%%%% ts = xydata(plist) %%%%%%%%%% 0131 if nparams(varargin{1}) == 0 0132 % return empty object 0133 else 0134 error('### Unknown xyzdata constructor method.'); 0135 end 0136 0137 else 0138 error('### Unknown xyzdata constructor method with one argument.'); 0139 end 0140 0141 elseif nargin == 3 0142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0143 %%%%%%%%%%%%%%%%%%%%%%%%%%% three input %%%%%%%%%%%%%%%%%%%%%%%%%%% 0144 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0145 0146 obj.x = varargin{1}; 0147 obj.y = varargin{2}; 0148 obj.z = varargin{3}; 0149 else 0150 error('### Unknown number of constructor arguments.'); 0151 end 0152 0153 %%%%%%%%%% Normalize the the x- and y-vector %%%%%%%%%% 0154 0155 nx = size(obj.z, 2); 0156 ny = size(obj.z, 1); 0157 0158 if length(obj.x) ~= nx 0159 error('### X-vector has wrong length.'); 0160 end 0161 if length(obj.y) ~= ny 0162 error('### Y-vector has wrong length.'); 0163 end 0164 0165 end % End constructor 0166 end 0167 0168 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0169 % Methods (public) % 0170 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0171 0172 methods 0173 varargout = copy(varargin) 0174 end 0175 0176 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0177 % Methods (protected) % 0178 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0179 0180 methods (Access = protected) 0181 end 0182 0183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0184 % Methods (public) % 0185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0186 0187 methods 0188 varargout = display(varargin); 0189 end 0190 0191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0192 % Methods (static) % 0193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0194 0195 methods (Static) 0196 varargout = update_struct(varargin); 0197 0198 function out = VEROUT() 0199 out = '$Id: xyzdata.m,v 1.11 2008/08/11 07:25:39 hewitson Exp $'; 0200 end 0201 0202 function ii = getInfo(varargin) 0203 ii = utils.helper.generic_getInfo(varargin{:}, 'xyzdata'); 0204 end 0205 0206 function out = SETS() 0207 out = {'Default'}; 0208 end 0209 0210 function out = getDefaultPlist(set) 0211 switch set 0212 case 'Default' 0213 out = plist(); 0214 otherwise 0215 error('### Unknown set [%s]', set'); 0216 end 0217 end 0218 0219 end 0220 0221 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0222 % Methods (abstract) % 0223 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0224 0225 methods (Abstract) 0226 end 0227 0228 end 0229