Day Length

Calculates the length of daylight for any day and latitude

You are now following this Submission

Calculates the length of daylight for any day of the year and latitude.
This uses Herbert Glarner's formulae which do not take into account refraction, twilight, size of the sun, etc http://herbert.gandraxa.com/herbert/lod.asp.

An example is included

See blog.nutaksas.com for more details/

Cite As

Travis Wiens (2026). Day Length (https://www.mathworks.com/matlabcentral/fileexchange/20390-day-length), 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.3.0.0

Fixes bug for latitudes above the arctic circle.

1.1.0.0

Removed GPL per Mathworks' requirements.

1.0.0.0

Mispel Tital