Mercurial > hg > ltpda
diff m-toolbox/classes/@data3D/data3D.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/classes/@data3D/data3D.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,132 @@ +% 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 +% +% VERSION: $Id: data3D.m,v 1.19 2011/03/30 13:15:00 mauro Exp $ +% +% SEE ALSO: ltpda_data, fsdata, tsdata, xydata, data3D +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +classdef (Hidden = true) data3D < data2D + + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Property definition % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + %---------- Public (read/write) Properties ---------- + properties (GetAccess = public, SetAccess = public) + zunits = unit; % units of the z-axis + z = []; % data values of the z-axis + dz = []; % error on z values + end + + %---------- Protected read-only Properties ---------- + properties (GetAccess = public, SetAccess = protected) + end + + %---------- Private Properties ---------- + properties (GetAccess = protected, SetAccess = protected) + end + + %---------- Abstract Properties ---------- + properties (Abstract = true, SetAccess = protected) + end + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Check property setting % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + methods + %--- Zunits + function set.zunits(obj, val) + if ~ischar(val) && ~isa(val, 'unit') + error('### The value for the property ''zunits'' must be a unit-object'); + end + if ischar(val) + obj.zunits = unit(val); + elseif isa(val, 'unit') + obj.zunits = val; + else + error('### The zunits value must be a unit or a string'); + end + end + %--- Z + function set.z(obj, val) + if ~isnumeric(val) || ndims(val) ~= 2 || isvector(val) + error('### The value for the property ''z'' must be a numeric matrix'); + end + obj.z = val; + end + end + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Constructor % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + methods + function obj = data3D(varargin) + end + end + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Methods (public) % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + methods + end + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Methods (protected) % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + methods (Access = protected) + varargout = fromStruct(varargin) + varargout = fromDom(varargin) + end + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Methods (private) % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + methods (Access = private) + end + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Methods (static) % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + methods (Static) + + function ii = getInfo(varargin) + ii = utils.helper.generic_getInfo(varargin{:}, 'data3D'); + end + + function out = VEROUT() + out = '$Id: data3D.m,v 1.19 2011/03/30 13:15:00 mauro Exp $'; + end + + function out = SETS() + out = {}; + end + + function out = getDefaultPlist() + out = []; + end + + end + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % Methods (abstract) % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + methods (Static) + end + +end +