This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
31 | [year, month, day, hour, minut... | 122 | 0.022 s | 100.0% |  |
39 | date.second=second; | 122 | 0 s | 0% |  |
38 | date.minute=minute; | 122 | 0 s | 0% |  |
37 | date.hour=hour; | 122 | 0 s | 0% |  |
36 | date.day=day; | 122 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
jd2date | function | 122 | 0.022 s | 100.0% |  |
mjd2jd | function | 122 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 39 |
Non-code lines (comments, blank lines) | 29 |
Code lines (lines that can run) | 10 |
Code lines that did run | 10 |
Code lines that did not run | 0 |
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.