Given an array of times and the latitude of a sundial, the function computes the corresponding angles of the shadow on the dial.
The sundial may be at any orientation - both bearing and tilt may be specified - but there are simple argument sequences for the common cases of horizontal and vertical sundials.
The solar declination may be specified explicitly as an angle or as a date, or it may be allowed to default. The default is to use, for each time, a declination for which the dial is illuminated on some day of the year. Times for which the dial is not illuminated return NaN.
A longitude correction may be applied, and the time may also be specified as mean solar time (clock time).
The coordinates of the shadow of the tip of the gnomon may be returned as additional results.
The help information includes examples and an outline of the mathematical relations underlying the code.
The function uses an arguments block so will not run in releases earlier than R2019b.