% function [ddd,hh,mm] = dec2hrmn(dectime)
%
% dec2hrmn converts decimal days into  Julian day, hour and minute.
% The input is, for example, 146.2369, and the output is [146,05,41].
% 
% Written by Ari W. Epstein in November, 1992.

function [ddd,hh,mm] = dec2hrmn(dectime)

ddd=fix(dectime);

dechr=dectime-ddd;
hh=fix(dechr*24);

mm=round((dechr*24-hh)*60);

if mm==60
    mm=0;
    hh=hh+1;
 end

if hh==24
    hh=0;
    ddd=ddd+1;
 end

