No BSD License  

Highlights from
Easter Sunday Indicator

1.0

1.0 | 3 ratings Rate this file 2 Downloads (last 30 days) File Size: 2.17 KB File ID: #12588

Easter Sunday Indicator

by

 

10 Oct 2006 (Updated )

Indicates if a date is the Easter Sunday

| Watch this File

File Information
Description

Returns an indicator 0 or 1 that tells if a date is the Easter Sunday according to either the Catholic or the Orthodox dogma.

Example:
>> e=easter(15,4,2002,'Catholic')

e =

     0

>> e=easter(31,3,2002,'Catholic')

e =

     1

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
09 Aug 2007 K T

Why is this in Financial Modeling & Analysis?

12 Oct 2006 Bob Jones

just because you can, doesn't mean you should.

12 Oct 2006 Stijn Helsen

The result doesn't seem to be correct!!

12 Oct 2006 Stijn Helsen

Some comments about the Matlab-code itself. Inputs like 'zeros(2,1)' pass the input test, while they shouldn't. Why not something like
... if numel(day)~=1 ....?
The last test in the two blocks can be moved to the end (the same), and shorter:
e=day==Easterday && month==Eastermonth;

Contact us