This is a static copy of a profile report

Home

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

Parents (calling functions)

Function NameFunction TypeCalls
analyze_SNPs_hapmapfunction1
Load_genome_informationfunction58
allelic_ratios_WGseqfunction4716128
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
33
[tline,lt] = fgets(fid);
471618745.891 s29.7%
31
narginchk(1,1)
471618730.419 s19.7%
34
tline = tline(1:end-length(lt)...
471618726.166 s17.0%
39
end
471618712.932 s8.4%
35
if isempty(tline)
47161876.229 s4.0%
All other lines  32.657 s21.2%
Totals  154.294 s100% 
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)32
Code lines (lines that can run)7
Code lines that did run5
Code lines that did not run2
Coverage (did run/can run)71.43 %
Function listing
time 
calls 
 line
   1 
function tline = fgetl(fid)
   2 
%FGETL Read line from file, discard newline character.
   3 
%   TLINE = FGETL(FID) returns the next line of a file associated with file
   4 
%   identifier FID as a MATLAB string. The line terminator is NOT
   5 
%   included. Use FGETS to get the next line with the line terminator
   6 
%   INCLUDED. If just an end-of-file is encountered, -1 is returned.  
   7 
%
   8 
%   If an error occurs while reading from the file, FGETL returns an empty
   9 
%   string. Use FERROR to determine the nature of the error.
  10 
%
  11 
%   MATLAB reads characters using the encoding scheme associated with the
  12 
%   file. See FOPEN for more information.
  13 
%
  14 
%   FGETL is intended for use with files that contain newline characters.
  15 
%   Given a file with no newline characters, FGETL may take a long time to 
  16 
%   execute.
  17 
%
  18 
%   Example
  19 
%       fid=fopen('fgetl.m');
  20 
%       while 1
  21 
%           tline = fgetl(fid);
  22 
%           if ~ischar(tline), break, end
  23 
%           disp(tline)
  24 
%       end
  25 
%       fclose(fid);
  26 
%
  27 
%   See also FGETS, FOPEN, FERROR.
  28 

  29 
%   Copyright 1984-2011 The MathWorks, Inc.
  30 

 30.42 
4716187 
  31 
narginchk(1,1) 
  32 

 45.89 
4716187 
  33 
[tline,lt] = fgets(fid); 
 26.17 
4716187 
  34 
tline = tline(1:end-length(lt)); 
  6.23 
4716187 
  35 
if isempty(tline) 
  36 
    tline = '';
  37 
end
  38 

 12.93 
4716187 
  39 
end