This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
imfinfofunction4
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
30
end
40 s0%
28
filenameOut = filenameIn;
40 s0%
27
isUrl = false;
40 s0%
25
else
40 s0%
9
if (strfind(filenameIn, '://')...
40 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
20Best practice is for CATCH to be followed by an identifier that gets the error information.
Coverage results
[ Show coverage for parent directory ]
Total lines in function30
Non-code lines (comments, blank lines)16
Code lines (lines that can run)14
Code lines that did run5
Code lines that did not run9
Coverage (did run/can run)35.71 %
Function listing
   time   calls  line
1 function [isUrl, filenameOut] = getFileFromURL(filenameIn)
2 %GETFILEFROMURL Detects whether the input filename is a URL and downloads
3 %file from the URL
4
5 % Copyright 2007 The MathWorks, Inc.
6 % $Revision: 1.1.6.1 $ $Date: 2007/03/27 19:14:42 $
7
8 % Download remote file.
4 9 if (strfind(filenameIn, '://'))
10
11 isUrl = true;
12
13 if (~usejava('jvm'))
14 error('MATLAB:getFileFromURL:noJVM', ...
15 'Reading from a URL requires a Java Virtual Machine.')
16 end
17
18 try
19 filenameOut = urlwrite(filenameIn, tempname);
20 catch
21 error('MATLAB:getFileFromURL:urlRead', ...
22 'Can''t read URL "%s".', filenameIn);
23 end
24
4 25 else
26
4 27 isUrl = false;
4 28 filenameOut = filenameIn;
29
4 30 end