No BSD License  

Highlights from
Skyplot1001

image thumbnail
from Skyplot1001 by Markus Penzkofer
Virtual Planetarium showing stars, the planets, the sun and the moon.

mjuldat(jahr,monat,tag,stunde)
function mjdat = mjuldat(jahr,monat,tag,stunde)

% function mjdat = mjuldat(jahr,monat,tag,stunde)
%
% modified Julian Date
% for dates since 4713 B.C.
% algorithms by Montenbruck/Pfleger: "Astronomy with the Personal Computer"
%
% 05.05.04 M.Penzkofer

A = 10000*jahr+100*monat+tag;
if (monat <=2)
   monat = monat+12;
   jahr = jahr-1;
end
if (A <= 15821004.1)
   B = -2+fix((jahr+4716)/4)-1179;
else
   B = fix(jahr/400)-fix(jahr/100)+fix(jahr/4);
end
A = 365*jahr-679004;
mjdat = A+B+fix(30.6001*(monat+1))+tag+stunde/24;

Contact us at files@mathworks.com