This is a static copy of a profile report

Home

mjd2date_v2 (122 calls, 0.022 sec)
Generated 05-Aug-2011 13:00:34 using cpu time.
function in file /home/LeechJ/cbass_analysis/matutils/dateconv/mjd2date_v2.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
mjd2stringfunction98
createDirfunction1
packdfunction20
webpipefunction1
skimfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
31
[year, month, day, hour, minut...
1220.022 s100.0%
39
date.second=second;
1220 s0%
38
date.minute=minute;
1220 s0%
37
date.hour=hour;
1220 s0%
36
date.day=day;
1220 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
jd2datefunction1220.022 s100.0%
mjd2jdfunction1220 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.022 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function39
Non-code lines (comments, blank lines)29
Code lines (lines that can run)10
Code lines that did run10
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function date= mjd2date_v2(mjd)
2
3 % date= mjd2date_v2(mjd)
4 %
5 % just like mjd2date(mjd) except this returns a structure
6 %
7 % ML
8
122 9 nargsin = nargin;
122 10 error(nargchk(1, 1, nargsin));
11
12 % We could have got everything by just using
13 %
14 % jd = mjd2jd(mjd);
15 % [year, month, day, hour, minute, second] = jd2date(jd);
16 %
17 % but we lose precision in the fraction part when MJD is converted to JD
18 % because of the large offset (2400000.5) between JD and MJD.
19 %
20 % 05-Apr-2011 (MAS): changed to above method, as a round-off error can
21 % occur when date and time are calculated separately. Try, for instance,
22 % an mjd of 55493.9999999998.
23
24 %jd = mjd2jd(mjd);
25 %[year, month, day] = jd2date(jd);
26 %
27 %fmjd = mjd - floor(mjd);
28 %[hour, minute, second] = days2hms(fmjd);
29
122 30 jd = mjd2jd(mjd);
0.02 122 31 [year, month, day, hour, minute, second] = jd2date(jd);
32
33
122 34 date.year=year;
122 35 date.month=month;
122 36 date.day=day;
122 37 date.hour=hour;
122 38 date.minute=minute;
122 39 date.second=second;

Other subfunctions in this file are not included in this listing.