No BSD License  

Highlights from
Easter Sunday Indicator

1.0

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

Easter Sunday Indicator

by Alexandros Leontitsis

 

10 Oct 2006 (Updated 10 Oct 2006)

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  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
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;

12 Oct 2006 Stijn Helsen

The result doesn't seem to be correct!!

12 Oct 2006 Bob Jones

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

09 Aug 2007 K T

Why is this in Financial Modeling & Analysis?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
finance Alexandros Leontitsis 22 Oct 2008 08:43:12
modeling Alexandros Leontitsis 22 Oct 2008 08:43:12
analysis Alexandros Leontitsis 22 Oct 2008 08:43:12
easter Alexandros Leontitsis 22 Oct 2008 08:43:12
dates Alexandros Leontitsis 22 Oct 2008 08:43:12
catholic Alexandros Leontitsis 22 Oct 2008 08:43:12
orthodox Alexandros Leontitsis 22 Oct 2008 08:43:12
dogma Alexandros Leontitsis 22 Oct 2008 08:43:12

Contact us at files@mathworks.com