This is a static copy of a profile report

Home

imagesci/private/istif (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/istif.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
26
tf = isequal(sig, [73; 73; 42;...
40 s0%
19
if isequal(sig, [73; 73; 43; 0...
40 s0%
15
fclose(fid);
40 s0%
14
sig = fread(fid, 4, 'uint8');
40 s0%
9
if (fid < 0)
40 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
19Use || instead of | as the OR operator in (scalar) conditional statements.
Coverage results
[ Show coverage for parent directory ]
Total lines in function26
Non-code lines (comments, blank lines)14
Code lines (lines that can run)12
Code lines that did run6
Code lines that did not run6
Coverage (did run/can run)50.00 %
Function listing
   time   calls  line
1 function tf = istif(filename)
2 %ISTIF Returns true for a TIF file.
3 % TF = ISTIF(FILENAME)
4
5 % Copyright 1984-2008 The MathWorks, Inc.
6 % $Revision: 1.1.6.3 $ $Date: 2007/09/18 02:16:26 $
7
4 8 fid = fopen(filename, 'r', 'ieee-le');
4 9 if (fid < 0)
10 tf = false;
11 return
12 end
13
4 14 sig = fread(fid, 4, 'uint8');
4 15 fclose(fid);
16
17 %
18 % Is it a BigTiff?
4 19 if isequal(sig, [73; 73; 43; 0]) | isequal(sig, [77; 77; 0; 43])
20 tf = true;
21 return
22 end
23
24 %
25 % It's not BigTiff. Check if it is classic Tiff.
4 26 tf = isequal(sig, [73; 73; 42; 0]) | isequal(sig, [77; 77; 0; 42]);