Computing Phases of the Moon

A MATLAB Script for Computing Phases of the Moon

https://sourceforge.net/u/cdeaglejr/profile/

You are now following this Submission

This MATLAB script uses Brent's one-dimensional extrema algorithm to determine the calendar date and UTC time of phases of the Moon.
phases of the Moon
===============
please input the initial calendar date
(1 <= month <= 12, 1 <= day <= 31, year = all digits!)
? 1,1,2025
please input the simulation period (days)
? 120
new moon
--------------
calendar date 29-Jan-2025
UTC time 12:36:24
illumination 0.00 percent
first quarter
---------------
calendar date 05-Feb-2025
UTC time 08:02:42
illumination 50.00 percent
full moon
------------
calendar date 12-Feb-2025
UTC time 13:53:44
illumination 100.00 percent
last quarter
---------------
calendar date 20-Feb-2025
UTC time 17:33:08
illumination 50.00 percent

Cite As

David Eagle (2026). Computing Phases of the Moon (https://www.mathworks.com/matlabcentral/fileexchange/70991-computing-phases-of-the-moon), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Gravitation, Cosmology & Astrophysics in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.1.0

Updated several algorithms, user inputs and script output.

1.0.0