Thread Subject: selecting the first 3 working days of a month

Subject: selecting the first 3 working days of a month

From: Joseph Frank

Date: 24 Nov, 2009 10:07:04

Message: 1 of 2

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

Subject: selecting the first 3 working days of a month

From: Branko

Date: 24 Nov, 2009 12:13:03

Message: 2 of 2

"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

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
weekday Branko 24 Nov, 2009 07:14:09
rssFeed for this Thread

Contact us at files@mathworks.com