Path: news.mathworks.com!not-for-mail
From: "Dan Haeg" <haegd@msoe.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: timestamps
Date: Tue, 22 Apr 2008 22:20:03 +0000 (UTC)
Organization: Milwaukee School of Engineering
Lines: 23
Message-ID: <fuloaj$i1q$1@fred.mathworks.com>
References: <fuln36$3f6$1@fred.mathworks.com>
Reply-To: "Dan Haeg" <haegd@msoe.edu>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1208902803 18490 172.30.248.35 (22 Apr 2008 22:20:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 22 Apr 2008 22:20:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 475291
Xref: news.mathworks.com comp.soft-sys.matlab:464644



"D Bay" <dbay@eos.ubc.ca> wrote in message
<fuln36$3f6$1@fred.mathworks.com>...
> My data becomes a series of timestamps much like this:  
> 
> 2/19/2008 13:59:45
> 2/19/2008 14:02:03
> 2/19/2008 14:04:30
> 2/19/2008 14:06:48
> 2/19/2008 14:09:21
> 
> To determine the flow rate, I am looking to find the time
> difference between tips. Do I need to convert the timestamps
> to a number, or is there a MATLAB script that can work
> directly with timestamps? 

s=['2/19/2008 13:59:45';
'2/19/2008 14:02:03';
'2/19/2008 14:04:30';
'2/19/2008 14:06:48';
'2/19/2008 14:09:21']

V = datevec(s, 0)
dt=etime(V(2,:),V(1,:))