This is a static copy of a profile report

Home

finfo>getExtension (4 calls, 0.131 sec)
Generated 05-Aug-2011 13:01:20 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/general/finfo.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
finfofunction4
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
128
s = imfinfo(filename);
40.131 s100.0%
132
return;
40 s0%
131
description = '';
40 s0%
130
[p,f,ext]=fileparts(filename);
40 s0%
129
catch exception %#ok
40 s0%
All other lines  0 s0%
Totals  0.131 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
imfinfofunction40.120 s91.7%
filepartsfunction40 s0%
Self time (built-ins, overhead, etc.)  0.011 s8.3%
Totals  0.131 s100% 
Code Analyzer results
Line numberMessage
130The value assigned here to 'p' appears to be unused. Consider replacing it by ~.
130The value assigned here to 'f' appears to be unused. Consider replacing it by ~.
Coverage results
[ Show coverage for parent directory ]
Total lines in function18
Non-code lines (comments, blank lines)5
Code lines (lines that can run)13
Code lines that did run6
Code lines that did not run7
Coverage (did run/can run)46.15 %
Function listing
   time   calls  line
124 function [ext, description] = getExtension(filename)
125 % try to get imfinfo (if file is image, use "im")
126
4 127 try
0.13 4 128 s = imfinfo(filename);
4 129 catch exception %#ok
4 130 [p,f,ext]=fileparts(filename);
4 131 description = '';
4 132 return;
133 end
134
135 ext = 'im';
136 if length(s) > 1
137 description = sprintf('%s file with %d images.\n\nImporting first image only.\n\nUse IMREAD to read images 2 through %d.', upper(s(1).Format), length(s), length(s));
138 else
139 description = sprintf('%d bit %s %s image%s', s.BitDepth, s.ColorType, ...
140 upper(s.Format));
141 end

Other subfunctions in this file are not included in this listing.