Home > classes > @tsdata > setTime.m

setTime

PURPOSE ^

SETTIME sets the time-vector of a tsdata object based on the length of

SYNOPSIS ^

function ts = setTime(ts)

DESCRIPTION ^

 SETTIME sets the time-vector of a tsdata object based on the length of
 the x vector and the sample rate.
 
 M Hewitson 31-01-07
 
 $Id: setTime.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 ts = setTime(ts)
0002 
0003 % SETTIME sets the time-vector of a tsdata object based on the length of
0004 % the x vector and the sample rate.
0005 %
0006 % M Hewitson 31-01-07
0007 %
0008 % $Id: setTime.html,v 1.1 2007/06/08 14:15:09 hewitson Exp $
0009 %
0010 
0011 ts.t     = linspace(0, ts.nsecs-1/ts.fs, length(ts.x));
0012 ts       = reshapeT(ts);
0013 
0014 % END

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