


GET gets xyzdata properties.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: GET gets xyzdata properties.
CALL: name = get(xyz, 'name');
x = get(xyz, 'x');
y = get(xyz, 'y');
z = get(xyz, 'z');
xunits = get(xyz, 'xunits');
yunits = get(xyz, 'yunits');
zunits = get(xyz, 'zunits');
created = get(xyz, 'created');
version = get(xyz, 'version');
VERSION: $Id: get.m,v 1.1 2007/12/24 19:47:06 hewitson Exp $
HISTORY: 30-01-2007 Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function val = get(xyz, propName) 0002 % GET gets xyzdata properties. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: GET gets xyzdata properties. 0007 % 0008 % CALL: name = get(xyz, 'name'); 0009 % x = get(xyz, 'x'); 0010 % y = get(xyz, 'y'); 0011 % z = get(xyz, 'z'); 0012 % xunits = get(xyz, 'xunits'); 0013 % yunits = get(xyz, 'yunits'); 0014 % zunits = get(xyz, 'zunits'); 0015 % created = get(xyz, 'created'); 0016 % version = get(xyz, 'version'); 0017 % 0018 % VERSION: $Id: get.m,v 1.1 2007/12/24 19:47:06 hewitson Exp $ 0019 % 0020 % HISTORY: 30-01-2007 Hewitson 0021 % Creation 0022 % 0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0024 0025 VERSION = '$Id: get.m,v 1.1 2007/12/24 19:47:06 hewitson Exp $'; 0026 0027 % Check if this is a call for parameters 0028 if nargin == 2 0029 if ischar(propName) 0030 in = char(propName); 0031 if strcmp(in, 'Params') 0032 val = plist; 0033 return 0034 elseif strcmp(in, 'Version') 0035 val = VERSION; 0036 return 0037 end 0038 end 0039 end 0040 0041 switch propName 0042 case 'name' 0043 val = xyz.name; 0044 case 'created' 0045 val = xyz.created; 0046 case 'version' 0047 val = xyz.version; 0048 case 'x' 0049 val = xyz.x; 0050 case 'y' 0051 val = xyz.y; 0052 case 'z' 0053 val = xyz.z; 0054 case 'xunits' 0055 val = xyz.xunits; 0056 case 'yunits' 0057 val = xyz.yunits; 0058 case 'zunits' 0059 val = xyz.zunits; 0060 otherwise 0061 error([propName, ' is not a valid xyzdata property.']); 0062 end 0063 0064