This is a static copy of a profile report

Home

fileread (2 calls, 0.000 sec)
Generated 14-Nov-2016 07:47:09 using cpu time.
function in file /usr/local/MATLAB/MATLAB_Production_Server/R2015a/toolbox/matlab/iofun/fileread.m
Copy to new window for comparing multiple runs

Parents (calling functions)

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

Line NumberCodeCallsTotal Time% TimeTime Plot
39
fclose(fid);
20 s0%
31
out = fread(fid,'*char')';
20 s0%
29
try
20 s0%
25
if fid == (-1)
20 s0%
24
[fid, msg] = fopen(filename);
20 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 function39
Non-code lines (comments, blank lines)21
Code lines (lines that can run)18
Code lines that did run8
Code lines that did not run10
Coverage (did run/can run)44.44 %
Function listing
time 
calls 
 line
   1 
function out=fileread(filename)
   2 
%FILEREAD Return contents of file as string vector.
   3 
%   TEXT = FILEREAD('FILENAME') returns the contents of the file FILENAME as a
   4 
%   MATLAB string.
   5 
%
   6 
%   See also FREAD, TEXTSCAN, LOAD, WEB.
   7 

   8 
% Copyright 1984-2011 The MathWorks, Inc.
   9 

  10 
% Validate input args
      2 
  11 
narginchk(1, 1); 
  12 

  13 
% get filename
      2 
  14 
if ~ischar(filename),  
  15 
    error(message('MATLAB:fileread:filenameNotString')); 
  16 
end
  17 

  18 
% do some validation
      2 
  19 
if isempty(filename),  
  20 
    error(message('MATLAB:fileread:emptyFilename')); 
  21 
end
  22 

  23 
% open the file
      2 
  24 
[fid, msg] = fopen(filename); 
      2 
  25 
if fid == (-1) 
  26 
    error(message('MATLAB:fileread:cannotOpenFile', filename, msg));
  27 
end
  28 

      2 
  29 
try 
  30 
    % read file
      2 
  31 
    out = fread(fid,'*char')'; 
  32 
catch exception
  33 
    % close file
  34 
    fclose(fid);
  35 
	throw(exception);
  36 
end
  37 

  38 
% close file
      2 
  39 
fclose(fid);