Path: news.mathworks.com!not-for-mail
From: "Branko " <bogunovic@mbss.org>
Newsgroups: comp.soft-sys.matlab
Subject: Re: selecting the first 3 working days of a month
Date: Tue, 24 Nov 2009 12:13:03 +0000 (UTC)
Organization: National Institute of Biology
Lines: 19
Message-ID: <hegikf$j20$1@fred.mathworks.com>
References: <hegb88$s9$1@fred.mathworks.com>
Reply-To: "Branko " <bogunovic@mbss.org>
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 1259064783 19520 172.30.248.35 (24 Nov 2009 12:13:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 24 Nov 2009 12:13:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 237386
Xref: news.mathworks.com comp.soft-sys.matlab:587449


"joseph Frank" <josephfrank1969@hotmail.com> wrote in message <hegb88$s9$1@fred.mathworks.com>...
> I have a vector of dates "Dates"
> I want to find the first 3 working days of January of each year. I wrote the following codes:
> 
> [yy,mm,dd]=datevec(Dates);
> 
> uyy=unique(yy);
> 
> for i=1:length(uyy)
> 
> Indx=find(ismember(yy,uyy(i) && mm==1 && "here I want to find the first 3 working days of the month) is there any function that gives me the first 3 working days?
> 
> end

Look:

doc weekday

Branko