File Exchange

image thumbnail

Easter Sunday Indicator

version 1.0 (2.17 KB) by

Indicates if a date is the Easter Sunday



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.

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

e =


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

e =


Comments and Ratings (4)


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