Sun Position

Contains functions for declination, solar longitude, radius vector, equation of time, times of sunrise and sunset, sun angles and azimuths.

Download
Download

You are now following this Submission

Cite As

Jeff Dozier (2026). Sun Position (https://www.mathworks.com/matlabcentral/fileexchange/74939-sun-position), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: Topographic Horizons

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with R2014b and later releases

Platform Compatibility

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

cleaned up internal folder structure

Download
1.2.2

MATLAB functions calculate azimuths clockwise from North. My convention has been to use counter-clockwise from south, positive east, negative west. I added a function to let the user choose which convention to use.

Download
1.2.1

No change in the code. Added an image showing the Global Daylight example.

Download
1.2.0

Updated one of the examples

Download
1.1.1

uploaded correct version

Download
1.1.0

removed call to today(), I didn't realize it was in the Financial Toolbox, thanks to Christie for reminder to use clock() instead. Also fixed a glitch in PlotSolarPath.

Download
1.0.0

Download