This is a static copy of a profile report

Home

timefun/private/dateformverify (121 calls, 0.131 sec)
Generated 05-Aug-2011 13:01:28 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/timefun/private/dateformverify.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
datestrfunction81
datevec>getformatsubfunction40
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
32
S = char(formatdate([y,mo,d,h,...
1210.131 s100.0%
23
[y,mo,d,h,minute,s] = datevecm...
1210 s0%
21
try
1210 s0%
15
if ~isfinite(dtnumber)
1210 s0%
10
if isempty(dtnumber)
1210 s0%
All other lines  0 s0%
Totals  0.131 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
timefun/private/formatdatefunction1210.120 s91.7%
Self time (built-ins, overhead, etc.)  0.011 s8.3%
Totals  0.131 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function32
Non-code lines (comments, blank lines)17
Code lines (lines that can run)15
Code lines that did run5
Code lines that did not run10
Coverage (did run/can run)33.33 %
Function listing
   time   calls  line
1 function S = dateformverify(dtnumber, dateformstr, islocal)
2 %Helper function for datevec, to determine if a format is right or not.
3 %This is a simplified copy of datestr. Takes as input a date number, and a
4 %dateformat, and whether to localize or not.
5
6 % Copyright 2003-2008 The MathWorks, Inc.
7
8 %This is an internal function only.
9
121 10 if isempty(dtnumber)
11 S = reshape('', 0, length(dateformstr));
12 return;
13 end
14
121 15 if ~isfinite(dtnumber)
16 %Don't bother to go through mex file, since datestr can not handle
17 %non-finite dates.
18 error(message('MATLAB:datestr:ConvertDateNumber'));
19 end
20
121 21 try
22 % Obtain components using mex file
121 23 [y,mo,d,h,minute,s] = datevecmx(dtnumber,true); mo(mo==0) = 1;
24 catch exception
25 newExc = MException('MATLAB:datestr:ConvertDateNumber',...
26 'DATESTR failed converting date number to date vector.');
27 newExc = newExc.addCause(exception);
28 throw(newExc);
29 end
30
31 % format date according to data format template
0.13 121 32 S = char(formatdate([y,mo,d,h,minute,s],dateformstr,islocal));