Home > classes > @tsdata > get.m

get

PURPOSE ^

GET get tsdata properties.

SYNOPSIS ^

function val = get(ts, propName)

DESCRIPTION ^

 GET get tsdata properties.

     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');

 M Hewitson 30-01-07

 $Id: get.html,v 1.1 2007/06/08 14:15:09 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003