This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
read_arcfunction2
calcNoiseIndicesfunction8
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
18
t=tstr2date(tstr(m,:));
100.033 s60.0%
24
mjd(m,1)=date2mjd(t.year,t.mon...
100.022 s40.0%
28
return
100 s0%
26
end
100 s0%
25
end
100 s0%
All other lines  0.000 s0.0%
Totals  0.055 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
tstr2datefunction100.022 s40.0%
date2mjdfunction100.011 s20.0%
monthStr2numfunction100 s0%
Self time (built-ins, overhead, etc.)  0.022 s40.0%
Totals  0.055 s100% 
Code Analyzer results
Line numberMessage
15The variable 'mjd' appears to change size on every loop iteration. Consider preallocating for speed.
24The variable 'mjd' appears to change size on every loop iteration. Consider preallocating for speed.
Coverage results
[ Show coverage for parent directory ]
Total lines in function28
Non-code lines (comments, blank lines)17
Code lines (lines that can run)11
Code lines that did run10
Code lines that did not run1
Coverage (did run/can run)90.91 %
Function listing
   time   calls  line
1 function mjd=tstr2mjd(tstr)
2
3 %mjd=tstr2mjd(tstr)
4 %
5 %Converts a SZA-standard UTC time string to mjd
6 %
7 %mjd=tstr2mjd('12-jun-2005:00:00:00')
8
9 % do in a loop if more than one time
10 10 l = size(tstr,1);
11
10 12 for m=1:l
10 13 if(isempty(strfind(tstr(m,:), '-')))
14 % time is blank
15 mjd(m,:) = 0;
10 16 else
17 %Separate units os string into fields of time structure t
0.03 10 18 t=tstr2date(tstr(m,:));
19
20 %Convert month string to integer
10 21 t=monthStr2num(t);
22
23 %Find mjd
0.02 10 24 mjd(m,1)=date2mjd(t.year,t.month,t.day,t.hour,t.min,t.sec);
10 25 end
10 26 end
27
10 28 return