Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!h40g2000prf.googlegroups.com!not-for-mail
From: NZTideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Summarizing yearly/monthly data in time series
Date: Wed, 28 Oct 2009 18:41:38 -0700 (PDT)
Organization: http://groups.google.com
Lines: 35
Message-ID: <c28afeaa-2a30-4cdd-bffc-07aceb07a1f4@h40g2000prf.googlegroups.com>
References: <hcaam2$8dv$1@fred.mathworks.com> <hcac7v$3d5$1@news.eternal-september.org> 
	<hcaehq$833$1@fred.mathworks.com> <hcam0p$q32$1@news.eternal-september.org> 
	<hcan1m$ak4$1@fred.mathworks.com> <hcandl$clp$1@news.eternal-september.org>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256780498 24263 127.0.0.1 (29 Oct 2009 01:41:38 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 29 Oct 2009 01:41:38 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: h40g2000prf.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bc6
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:580815


On Oct 29, 1:20 pm, dpb <n...@non.net> wrote:
> Oleg Komarov wrote:
> > dpb <n...@non.net> wrote in message <hcam0p$q3...@news.eternal-september.org>...
> >> Oleg Komarov wrote:
> >> ...
> >>> Data ranges loose on precision.
> >> ...
> >> Certainly not at level of days since they're integer values...
>
> >> --
>
> > i used "loose on precision" improperly.
> > What i meant is, defining fixed ranges (lets say of 30 days) would
> > possibly lead sometimes to group into the same month, one or two days of
> > another month.
> > suppose i start on the 31 jan, setting 30 days as my range to get montlhy stats.
> > 31 jan + 30 would yield 1 or 2 march!
>
> Well, that's not how you would set the intervals, obviously.  One would
> specify the start/end dates and compute the datevalues for those as
> well.  This leaves one w/ a totally generic interface where the user can
> request any range within the database with no changes in algorithm.
>
> --

Now come on children, stop bickering!!

It's quite easy really.
To get the start times for the first of each month for the 100 months
from 1-Jan-2009:
t=datenum(2009*ones(100,1),[1:100]',ones(100,1));