This is a static copy of a profile report

Home

ls (20 calls, 0.030 sec)
Generated 05-Nov-2014 07:52:32 using cpu time.
function in file /usr1/opt/matlab/7.13/toolbox/matlab/general/ls.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
ml_lsfunction20
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
32
[s,listing] = unix(['ls', quot...
200.030 s100.0%
65
end
200 s0%
64
varargout{1} = listing;
200 s0%
63
elseif nargout > 0
200 s0%
61
if nargout == 0 && isu...
200 s0%
All other lines  0 s0%
Totals  0.030 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
ls>quoteUnixCmdArgsubfunction200.030 s100.0%
isunixfunction200 s0%
iscellstrfunction200 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.030 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function65
Non-code lines (comments, blank lines)26
Code lines (lines that can run)39
Code lines that did run12
Code lines that did not run27
Coverage (did run/can run)30.77 %
Function listing
   time   calls  line
1 function varargout=ls(varargin)
2 %LS List directory.
3 % LS displays the results of the 'ls' command on UNIX. On UNIX,
4 % LS returns a character row vector of filenames separated
5 % by tab and space characters. On Windows, LS returns an m-by-n
6 % character array of filenames, where m is the number of filenames
7 % and n is the number of characters in the longest filename found.
8 % Filenames shorter than n characters are padded with space characters.
9 %
10 % You can pass any flags to LS as well that your operating system supports.
11 %
12 % See also DIR, MKDIR, RMDIR, FILEATTRIB, COPYFILE, MOVEFILE, DELETE.
13
14 % Copyright 1984-2008 The MathWorks, Inc.
15 % $Revision: 5.17.4.9 $ $Date: 2011/03/09 06:58:44 $
16 %=============================================================================
17 % validate input parameters
20 18 if ~iscellstr(varargin)
19 error(message('MATLAB:ls:InputsMustBeStrings'));
20 end
21
22 % check output arguments
20 23 if nargout > 1
24 error(message('MATLAB:ls:TooManyOutputArguments'));
25 end
26
27 % perform platform specific directory listing
20 28 if isunix
20 29 if nargin == 0
30 [s,listing] = unix('ls');
20 31 else
0.03 20 32 [s,listing] = unix(['ls', quoteUnixCmdArg(varargin{:})]);
20 33 end
34
20 35 if s~=0
36 error(message('MATLAB:ls:OSError',listing));
37 end
38 else
39 if nargin == 0
40 %hack to display output of dir in wide format. dir; prints out
41 %info. d=dir does not!
42 if nargout == 0
43 dir;
44 else
45 d = dir;
46 listing = char(d.name);
47 end
48 elseif nargin == 1
49 if nargout == 0
50 dir(varargin{1});
51 else
52 d = dir(varargin{1});
53 listing = char(d.name);
54 end
55 else
56 error(message('MATLAB:ls:TooManyInputArguments'));
57 end
58 end
59
60 % determine output mode, depending on presence of output arguments
20 61 if nargout == 0 && isunix
62 disp(listing)
20 63 elseif nargout > 0
20 64 varargout{1} = listing;
20 65 end

Other subfunctions in this file are not included in this listing.