File Exchange

image thumbnail

Easter Sunday Indicator

version 1.0 (2.17 KB) by

Indicates if a date is the Easter Sunday

0 Downloads

Updated

No License

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

Comments and Ratings (4)

K T

Why is this in Financial Modeling & Analysis?

Bob Jones

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

Stijn Helsen

The result doesn't seem to be correct!!

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;

MATLAB Release
MATLAB 7 (R14)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video