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.7 2008/02/11 17:28:45 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.7 2008/02/11 17:28:45 ingo Exp $ 0019 % 0020 % HISTORY: 30-01-07 M Hewitson 0021 % Creation 0022 % 0023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0024 0025 VERSION = '$Id: get.m,v 1.7 2008/02/11 17:28:45 ingo Exp $'; 0026 CATEGORY = 'Helper'; 0027 DEFAULT_PLIST = plist('property', ''); 0028 0029 %%% If prop_name is a plist then extrat the poperty name from the plist. 0030 if isa(propName, 'plist') 0031 propName = find(propName, 'property'); 0032 if isempty(propName) 0033 error ('### The plist does not contain the ''key'' = ''property'''); 0034 end 0035 end 0036 0037 %%% Special case: If propName is equal to 'vals' then return the 'y' property 0038 if strcmp(propName, 'vals') 0039 val = c.y; 0040 return 0041 0042 %%% Special case: If propName is equal to 'tags' then return the 'x' property 0043 elseif strcmp(propName, 'tags') 0044 val = c.x; 0045 return 0046 end 0047 0048 val = generic_get(c, propName, DEFAULT_PLIST, VERSION, CATEGORY); 0049