File Exchange

image thumbnail

Building Sundials

version (24 KB) by Ned Gulley
Create your own sundial with MATLAB.


Updated 01 Sep 2016

View License

If carefully built, a sundial is perfectly capable of keeping accurate time. The problem is that you need a different sundial for every combination of latitude, longitude, and day of the year. Fortunately MATLAB® can make this a manageable problem. By turning this procedure around, you can also use MATLAB to tell you which way is north.

The algorithms used here for MATLAB sundial creation were adapted from

Comments and Ratings (2)


why not just some simple trigonometry? After all, all of the original ALGORITHMS were in that formay: stuff having to put it into some programme which I do not have the machine for: the TI-81 is more than sufficent to the task, if one has the proper ALGORITHMS.

martyn dorey

Fantastic. Would be good to include a vertical mounted sundial too.


Updated license

Updating copyright line.

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux