This is a static copy of a profile report

Home

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

Parents (calling functions)

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

Line NumberCodeCallsTotal Time% TimeTime Plot
19
if(~exist('ii'))
320.033 s100.0%
20
return
320 s0%
16
Mon={'Jan','Feb','Mar','Apr','...
320 s0%
13
mon={'jan','feb','mar','apr','...
320 s0%
10
MON={'JAN','FEB','MAR','APR','...
320 s0%
All other lines  0 s0%
Totals  0.033 s100% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
19EXIST with two input arguments is generally faster and clearer than with one input argument.
Coverage results
[ Show coverage for parent directory ]
Total lines in function26
Non-code lines (comments, blank lines)15
Code lines (lines that can run)11
Code lines that did run5
Code lines that did not run6
Coverage (did run/can run)45.45 %
Function listing
   time   calls  line
1 function [MON mon Mon] =getmonth(ii)
2
3 % function mon=getmonth
4 %
5 % returns a cell array of months, {'JAN','FEB',etc}
6 %
7 % Michael Loh
8
9
32 10 MON={'JAN','FEB','MAR','APR','MAY','JUN','JUL',...
11 'AUG','SEP','OCT','NOV','DEC'};
12
32 13 mon={'jan','feb','mar','apr','may','jun','jul',...
14 'aug','sep','oct','nov','dec'};
15
32 16 Mon={'Jan','Feb','Mar','Apr','May','Jun','Jul',...
17 'Aug','Sep','Oct','Nov','Dec'};
18
0.03 32 19 if(~exist('ii'))
32 20 return
21 else
22 MON = MON(ii);
23 mon = mon(ii);
24 Mon = Mon(ii);
25 end
26 return