GET get tsdata properties. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: GET get tsdata properties. CALL: name = get(ts, 'name'); fs = get(ts, 'fs'); t = get(ts, 't'); x = get(ts, 'x'); nsecs = get(ts, 'nsecs'); t0 = get(ts, 't0'); xunits = get(ts, 'xunits'); yunits = get(ts, 'yunits'); created = get(ts, 'created'); version = get(ts, 'version'); VERSION: $Id: get.m,v 1.5 2007/06/18 11:00:24 ingo Exp $ HISTORY: 30-01-07 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function val = get(ts, propName) 0002 % GET get tsdata properties. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: GET get tsdata properties. 0007 % 0008 % CALL: name = get(ts, 'name'); 0009 % fs = get(ts, 'fs'); 0010 % t = get(ts, 't'); 0011 % x = get(ts, 'x'); 0012 % nsecs = get(ts, 'nsecs'); 0013 % t0 = get(ts, 't0'); 0014 % xunits = get(ts, 'xunits'); 0015 % yunits = get(ts, 'yunits'); 0016 % created = get(ts, 'created'); 0017 % version = get(ts, 'version'); 0018 % 0019 % VERSION: $Id: get.m,v 1.5 2007/06/18 11:00:24 ingo Exp $ 0020 % 0021 % HISTORY: 30-01-07 M Hewitson 0022 % Creation 0023 % 0024 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0025 0026 switch propName 0027 case 'name' 0028 val = ts.name; 0029 case 'created' 0030 val = ts.created; 0031 case 'version' 0032 val = ts.version; 0033 case 'fs' 0034 val = ts.fs; 0035 case 't' 0036 val = ts.t; 0037 case 'x' 0038 val = ts.x; 0039 case 'xunits' 0040 val = ts.xunits; 0041 case 'yunits' 0042 val = ts.yunits; 0043 case 'nsecs' 0044 val = ts.nsecs; 0045 case 't0' 0046 val = ts.t0; 0047 otherwise 0048 error([propName, ' is not a valid tsdata property.']); 0049 end