Output: phases of the Moon and time of lunar eclipses are specified.
Montenbruck O., Pfleger T.; Astronomy on the Personal Computer; Springer Verlag, Heidelberg; 4th edition (2000).
Meeus J.; Astronomical Algorithms; Willmann-Bell; Richmond, Virginia; 2nd edition (1998).
Meysam Mahooti (2019). Moon Phases (https://www.mathworks.com/matlabcentral/fileexchange/55270-moon-phases), MATLAB Central File Exchange. Retrieved .
Dear Jicai Zhang,
DE430Coeff.mat full matrix is now available in the following link:
Use it rather than existing DE430Coeff.mat matrix and get what you like!
I Love it！Thanks. Except it probably can not calculate the years before 1949 or after 2049.
Better to have the year as an input, as follows:
Year= input (' Select the year: ');
Remarks: outputs for year 1972 work _properly_, despite the note of WB Buddendorf user.
This is a handy tool. However, the script enters an infinite loop in certain years. For example, in 1972 when it's determining the timing for the full moon, the script stops running. It seems this happens in the 'Pegasus' function where some of the variables (x3 first, other later on in the script) get NaN values. Is there a possibility to work around this? Tried changing the accuracy but doesn't seem to achieve much...
ETminUT.m is updated to cover more years considering you are using DE430Coeff.mat full matrix from https://www.researchgate.net/publication/331821512_JPL_Planetary_and_Lunar_Ephemerides_DE430_full_MATLAB_matrix
ETminUT.m is revised and JPL Development Ephemeris (DE430) are used for computation of the Sun and the Moon positions in PhasesFunc.m.
Revised on 2017-03-05.
The image is added.