Returns an indicator 0 or 1 that tells if a date is the Easter Sunday according to either the Catholic or the Orthodox dogma.
Alexandros Leontitsis (2021). Easter Sunday Indicator (https://www.mathworks.com/matlabcentral/fileexchange/12588-easter-sunday-indicator), MATLAB Central File Exchange. Retrieved .
Why is this in Financial Modeling & Analysis?
just because you can, doesn't mean you should.
The result doesn't seem to be correct!!
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;
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!