This is a static copy of a profile reportHome
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 Name | Function Type | Calls |
finfo | function | 4 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
128 | s = imfinfo(filename); | 4 | 0.131 s | 100.0% |  |
132 | return; | 4 | 0 s | 0% |  |
131 | description = ''; | 4 | 0 s | 0% |  |
130 | [p,f,ext]=fileparts(filename); | 4 | 0 s | 0% |  |
129 | catch exception %#ok | 4 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.131 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
imfinfo | function | 4 | 0.120 s | 91.7% |  |
fileparts | function | 4 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.011 s | 8.3% |  |
Totals | | | 0.131 s | 100% | |
Code Analyzer results
Line number | Message |
130 | The value assigned here to 'p' appears to be unused. Consider replacing it by ~. |
130 | The value assigned here to 'f' appears to be unused. Consider replacing it by ~. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 18 |
Non-code lines (comments, blank lines) | 5 |
Code lines (lines that can run) | 13 |
Code lines that did run | 6 |
Code lines that did not run | 7 |
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.