This is a static copy of a profile report

Home

imagesci/private/isppm (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/isppm.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
24
end
40 s0%
18
tf = (isequal(sig(1:2), [80;51...
40 s0%
14
if ( count ~= 3 )
40 s0%
13
fclose(fid);
40 s0%
12
[sig,count] = fread(fid, 3, 'u...
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 function24
Non-code lines (comments, blank lines)12
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 = isppm(filename)
2 %ISPPM Returns true for a PPM file.
3 % TF = ISPPM(FILENAME)
4
5 % Copyright 1984-2009 The MathWorks, Inc.
6 % $Revision: 1.1.6.4 $ $Date: 2009/03/09 19:22:24 $
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;51]) || isequal(sig(1:2), [80;54])) && ...
19 (isequal(sig(3), 10) || ... % \n
20 isequal(sig(3), 13) || ... % \r
21 isequal(sig(3), 35) || ... % "#"
22 isequal(sig(3), 9) || ... % \t
23 isequal(sig(3), 32));
4 24 end