DATA3D is the abstract base class for 3-dimensional data objects. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: DATA3D is the base class for 3-dimensional data objects. This is an abstract class. SUPER CLASSES: ltpda_data < ltpda_nuo < ltpda_obj SUB CLASSES: xydata, tsdata, fsdata, data3D PROPERTIES: Inherit Properties (read only) version - cvs-version string. Protected Properties (read only) xunits - units of the y-axis yunits - units of the y-axis x - data values of the x-axis y - data values of the y-axis DATA3D METHODS: Public Methods char - returns one character string which represents the object setZunits - set the property 'xunits' setZ - set the property 'z' setXY - set the property 'x' and 'y' setXYZ - set the property 'x' and 'y' and 'z' getZ - get the property 'z' applymethod - applys the given method to the input 3D data applyoperator - applys the given operator to the two input data objects VERSION: $Id: data3D.m,v 1.8 2008/09/08 08:29:13 hewitson Exp $ HISTORY: 09-06-2008 Hewitson Creation. SEE ALSO: ltpda_data, fsdata, tsdata, xydata, data3D %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % DATA3D is the abstract base class for 3-dimensional data objects. 0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0003 % 0004 % DESCRIPTION: DATA3D is the base class for 3-dimensional data objects. This is 0005 % an abstract class. 0006 % 0007 % SUPER CLASSES: ltpda_data < ltpda_nuo < ltpda_obj 0008 % 0009 % SUB CLASSES: xydata, tsdata, fsdata, data3D 0010 % 0011 % PROPERTIES: 0012 % 0013 % Inherit Properties (read only) 0014 % version - cvs-version string. 0015 % 0016 % Protected Properties (read only) 0017 % xunits - units of the y-axis 0018 % yunits - units of the y-axis 0019 % x - data values of the x-axis 0020 % y - data values of the y-axis 0021 % 0022 % DATA3D METHODS: 0023 % 0024 % Public Methods 0025 % char - returns one character string which represents the object 0026 % setZunits - set the property 'xunits' 0027 % setZ - set the property 'z' 0028 % setXY - set the property 'x' and 'y' 0029 % setXYZ - set the property 'x' and 'y' and 'z' 0030 % getZ - get the property 'z' 0031 % applymethod - applys the given method to the input 3D data 0032 % applyoperator - applys the given operator to the two input data objects 0033 % 0034 % VERSION: $Id: data3D.m,v 1.8 2008/09/08 08:29:13 hewitson Exp $ 0035 % 0036 % HISTORY: 09-06-2008 Hewitson 0037 % Creation. 0038 % 0039 % SEE ALSO: ltpda_data, fsdata, tsdata, xydata, data3D 0040 % 0041 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0042 0043 classdef data3D < data2D 0044 0045 0046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0047 % Property definition % 0048 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0049 0050 %---------- Public (read/write) Properties ---------- 0051 properties 0052 end 0053 0054 %---------- Protected read-only Properties ---------- 0055 properties 0056 zunits = unit; 0057 z = []; 0058 end 0059 0060 %---------- Private Properties ---------- 0061 properties (GetAccess = protected, SetAccess = protected) 0062 end 0063 0064 %---------- Abstract Properties ---------- 0065 properties (Abstract = true, SetAccess = protected) 0066 end 0067 0068 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0069 % Check property setting % 0070 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0071 0072 methods 0073 %--- Zunits 0074 function obj = set.zunits(obj, val) 0075 if ~ischar(val) && ~isa(val, 'unit') 0076 error('### The value for the property ''zunits'' must be a unit-object'); 0077 end 0078 if ischar(val) 0079 obj.zunits = unit(val); 0080 elseif isa(val, 'unit') 0081 obj.zunits = val; 0082 else 0083 error('### The zunits value must be a unit or a string'); 0084 end 0085 end 0086 %--- Z 0087 function obj = set.z(obj, val) 0088 if ~isnumeric(val) || ndims(val) ~= 2 || isvector(val) 0089 error('### The value for the property ''z'' must be a numeric matrix'); 0090 end 0091 obj.z = val; 0092 end 0093 end 0094 0095 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0096 % Constructor % 0097 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0098 0099 methods 0100 function obj = data3D(varargin) 0101 0102 %%% Call superclass 0103 obj = obj@data2D(varargin{:}); 0104 0105 %%%%%%%%%% Set dafault values %%%%%%%%%% 0106 0107 if nargin == 1 0108 if isstruct(varargin{1}) 0109 %%%%%%%%%% obj = data3D(struct) %%%%%%%%%% 0110 0111 %%% Set properties which are declared in this class 0112 data3D_struct = varargin{1}; 0113 0114 obj.zunits = data3D_struct.zunits; 0115 obj.z = data3D_struct.z; 0116 end 0117 end 0118 end % End constructor 0119 0120 end 0121 0122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0123 % Methods (public) % 0124 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0125 0126 methods 0127 varargout = setZunits(varargin) 0128 varargout = setZ(varargin) 0129 varargout = getZ(varargin) 0130 0131 function varargout = applymethod(varargin), error('### code me up because we Inherit this fcn.'); end 0132 function varargout = applyoperator(varargin), error('### code me up because we Inherit this fcn.'); end 0133 end 0134 0135 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0136 % Methods (protected) % 0137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0138 0139 methods (Access = protected) 0140 end 0141 0142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0143 % Methods (public) % 0144 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0145 0146 methods 0147 end 0148 0149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0150 % Methods (static) % 0151 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0152 0153 methods (Static) 0154 0155 function ii = getInfo(varargin) 0156 ii = utils.helper.generic_getInfo(varargin{:}, 'data3D'); 0157 end 0158 0159 function out = VEROUT() 0160 out = '$Id: data3D.m,v 1.8 2008/09/08 08:29:13 hewitson Exp $'; 0161 end 0162 0163 function out = SETS() 0164 out = {}; 0165 end 0166 0167 function out = getDefaultPlist() 0168 out = []; 0169 end 0170 0171 end 0172 0173 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0174 % Methods (abstract) % 0175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0176 0177 methods (Static) 0178 end 0179 0180 end 0181