This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
jd2datefunction122
mjd2datefunction1
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
23
second = second - 60*minute;  ...
1230 s0%
22
minute = fix(second/60);      ...
1230 s0%
21
second = second - 3600*hour;  ...
1230 s0%
20
hour   = fix(second/3600);    ...
1230 s0%
19
second = 86400 * days;
1230 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function23
Non-code lines (comments, blank lines)17
Code lines (lines that can run)6
Code lines that did run6
Code lines that did not run0
Coverage (did run/can run)100.00 %
Function listing
   time   calls  line
1 function [hour, minute, second] = days2hms(days)
2 %DAYS2HMS Convert days into hours, minutes, and seconds.
3 %
4 % [HOUR, MINUTE, SECOND] = DAYS2HMS(DAYS) converts the number of days to
5 % hours, minutes, and seconds.
6 %
7 % The following holds (to within rounding precision):
8 %
9 % DAYS = HOUR / 24 + MINUTE / (24 * 60) + SECOND / (24 * 60 * 60)
10 % = (HOUR + (MINUTE + SECOND / 60) / 60) / 24
11
12 % Author: Peter J. Acklam
13 % Time-stamp: 2002-03-03 12:52:02 +0100
14 % E-mail: pjacklam@online.no
15 % URL: http://home.online.no/~pjacklam
16
123 17 error(nargchk(1, 1, nargin));
18
123 19 second = 86400 * days;
123 20 hour = fix(second/3600); % get number of hours
123 21 second = second - 3600*hour; % remove the hours
123 22 minute = fix(second/60); % get number of minutes
123 23 second = second - 60*minute; % remove the minutes