Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Summarizing yearly/monthly data in time series
Date: Wed, 4 Nov 2009 19:23:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <hcskan$787$1@fred.mathworks.com>
References: <hcaam2$8dv$1@fred.mathworks.com> <hcac7v$3d5$1@news.eternal-september.org> <2b1ccf73-822a-443a-9ddb-c5f7ed5b01df@b36g2000prf.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257362583 7431 172.30.248.37 (4 Nov 2009 19:23:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 19:23:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1886545
Xref: news.mathworks.com comp.soft-sys.matlab:582496


TideMan <mulgor@gmail.com> wrote in message <2b1ccf73-822a-443a-9ddb-c5f7ed5b01df@b36g2000prf.googlegroups.com>...
> On Oct 29, 9:49?pm, "Oleg Komarov" <oleg.koma...@hotmail.it> wrote:
> > > 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));
> >
> > well show me how easy is to get the intervals on each end of the month ona period longer than 4 years...
> > :)
> 
> How about:
> t=datenum(2009*ones(100,1),[1:100]',ones(100,1)) - 1;
Actually the best solution to find the last day of the month. 
I use the same concept, find the day "1" of a month and go back by one but never came in mind this feature: is it documented that datenum increments automatically the conversion if month > 12? 
does it follows the same principle for day > 31?