This is a static copy of a profile report

Home

imagesci/private/ispnm (4 calls, 0.000 sec)
Generated 05-Aug-2011 13:01:20 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/imagesci/private/ispnm.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
imagesci/private/imftypefunction4
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
29
end
40 s0%
18
tf = ((isequal(sig(1:2), [80;4...
40 s0%
14
if ( count ~= 3 )
40 s0%
13
fclose(fid);
40 s0%
12
[sig, count] = fread(fid, 3, '...
40 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function29
Non-code lines (comments, blank lines)17
Code lines (lines that can run)12
Code lines that did run8
Code lines that did not run4
Coverage (did run/can run)66.67 %
Function listing
   time   calls  line
1 function tf = ispnm(filename)
2 %ISPBM Returns true for a PNM file (PBM, PGM, or PPM).
3 % TF = ISPBM(FILENAME)
4
5 % Copyright 1984-2009 The MathWorks, Inc.
6 % $Revision: 1.1.6.5 $ $Date: 2009/03/09 19:22:23 $
7
4 8 fid = fopen(filename, 'r', 'ieee-le');
4 9 if (fid < 0)
10 tf = false;
4 11 else
4 12 [sig, count] = fread(fid, 3, 'uint8');
4 13 fclose(fid);
4 14 if ( count ~= 3 )
15 tf = false;
16 return
17 end
4 18 tf = ((isequal(sig(1:2), [80;49]) || ... % PBM
19 isequal(sig(1:2), [80;52])) || ... % PBM
20 (isequal(sig(1:2), [80;50]) || ... % PGM
21 isequal(sig(1:2), [80;53])) || ... % PGM
22 (isequal(sig(1:2), [80;51]) || ... % PPM
23 isequal(sig(1:2), [80;54]))) && ... % PPM
24 (isequal(sig(3), 10) || ... % \n
25 isequal(sig(3), 13) || ... % \r
26 isequal(sig(3), 35) || ... % "#"
27 isequal(sig(3), 9) || ... % \t
28 isequal(sig(3), 32)); % space
4 29 end