


GET get csdata properties.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: GET get csdata properties.
CALL: name = get(c, 'name');
created = get(c, 'created');
version = get(c, 'version');
y = get(c, 'y');
y = get(c, 'vals');
x = get(c, 'x');
x = get(c, 'tags');
xunit = get(c, 'xunits');
yunit = get(c, 'yunits');
VERSION: $Id: get.m,v 1.5 2007/11/13 16:03:20 ingo Exp $
HISTORY: 30-01-07 M Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function val = get(c, propName) 0002 % GET get csdata properties. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: GET get csdata properties. 0007 % 0008 % CALL: name = get(c, 'name'); 0009 % created = get(c, 'created'); 0010 % version = get(c, 'version'); 0011 % y = get(c, 'y'); 0012 % y = get(c, 'vals'); 0013 % x = get(c, 'x'); 0014 % x = get(c, 'tags'); 0015 % xunit = get(c, 'xunits'); 0016 % yunit = get(c, 'yunits'); 0017 % 0018 % VERSION: $Id: get.m,v 1.5 2007/11/13 16:03:20 ingo Exp $ 0019 % 0020 % HISTORY: 30-01-07 M Hewitson 0021 % Creation 0022 % 0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0024 0025 VERSION = '$Id: get.m,v 1.5 2007/11/13 16:03:20 ingo Exp $'; 0026 0027 % Check if this is a call for parameters 0028 if nargin == 2 0029 if isa(c, 'cdata') && 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 = c.name; 0044 case 'created' 0045 val = c.created; 0046 case 'version' 0047 val = c.version; 0048 case 'vals' 0049 val = c.y; 0050 case 'y' 0051 val = c.y; 0052 case 'x' 0053 val = c.x; 0054 case 'tags' 0055 val = c.x; 0056 case 'xunits' 0057 val = c.xunits; 0058 case 'yunits' 0059 val = c.yunits; 0060 otherwise 0061 error([propName, ' is not a valid cdata property.']); 0062 end