Thread Subject: timestamps

Subject: timestamps

From: D Bay

Date: 22 Apr, 2008 21:59:02

Message: 1 of 2

I am new to MATLAB and looking for someone to point me in
the right direction.

I have a large datafile of water flow gauge data where every
time 25 mL of water falls into a bucket, it causes the
bucket to tip, causing a magnet to pass over a microswitch
which sends a pulse to a datalogger that records the time stamp.

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?

In addition, in some cases we have missing tips. If the time
between tips is 60s, 60s, 60s, 120s, 60s, 180s, etc etc, I
know that the flow rate is (25mL/60s) on average. However,
when there is a 120 or 180, I know that these numbers
signify one or two missed tips (60x2, 60x3). I would like to
know if there are any functions that will help me to
manipulate the data so that 120 will be divided into 60 and
60, with an interpolated timestamp for the new 60s interval.

Any help, directions, ideas etc would be greatly appreciated.

Cheers

Danny
dbay@eos.ubc.ca

Subject: timestamps

From: Dan Haeg

Date: 22 Apr, 2008 22:20:03

Message: 2 of 2

"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,:))

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com