


GET gets xydata properties.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: GET gets xydata properties.
CALL: name = get(xy, 'name');
x = get(xy, 'x');
y = get(xy, 'y');
xunits = get(xy, 'xunits');
yunits = get(xy, 'yunits');
created = get(xy, 'created');
version = get(xy, 'version');
VERSION: $Id: get.m,v 1.4 2007/11/13 16:03:20 ingo Exp $
HISTORY: 30-01-2007 Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

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