This is a static copy of a profile reportHome
help (2 calls, 0.141 sec)
Generated 15-Mar-2007 12:02:08 using real time.
M-function in file C:\Program Files\MATLAB71\toolbox\matlab\helptools\help.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
No parent Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
119 | displayHelp(helpStr, topic, fe... | 2 | 0.078 s | 55.6% |  |
101 | helpStr = getHelpText(varargin... | 2 | 0.031 s | 22.2% |  |
90 | if nargout == 0 | 2 | 0.031 s | 22.2% |  |
120 | end | 2 | 0 s | 0% |  |
105 | if isempty(helpStr) | 2 | 0 s | 0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.141 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
help>displayHelp | M-subfunction | 2 | 0.078 s | 55.6% |  |
help>getHelpText | M-subfunction | 2 | 0.031 s | 22.2% |  |
ispc | M-function | 2 | 0 s | 0% |  |
usejava | M-function | 2 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.031 s | 22.2% |  |
Totals | | | 0.141 s | 100% | |
M-Lint results
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 125 |
Non-code lines (comments, blank lines) | 83 |
Code lines (lines that can run) | 42 |
Code lines that did run | 12 |
Code lines that did not run | 30 |
Coverage (did run/can run) | 28.57 % |
Function listing
time calls line
1 function [varargout] = help(varargin)
2 % HELP Display help text in Command Window.
3 % HELP, by itself, lists all primary help topics. Each primary topic
4 % corresponds to a directory name on the MATLABPATH.
5 %
6 % HELP / lists a description of all operators and special characters.
7 %
8 % HELP FUN displays a description of and syntax for the function FUN.
9 % When FUN is in multiple directories on the MATLAB path, HELP displays
10 % information about the first FUN found on the path and lists
11 % PATHNAME/FUN for other (overloaded) FUNs.
12 %
13 % HELP PATHNAME/FUN displays help for the function FUN in the PATHNAME
14 % directory. Use this syntax to get help for overloaded functions.
15 %
16 % HELP DIR displays a brief description of each function in the MATLAB
17 % directory DIR. DIR can be a relative partial pathname (see HELP
18 % PARTIALPATH). When there is also a function called DIR, help for both
19 % the directory and the function are provided.
20 %
21 % HELP CLASSNAME.METHODNAME displays help for the method METHODNAME of
22 % the fully qualified class CLASSNAME. To determine CLASSNAME for
23 % METHODNAME, use CLASS(OBJ), where METHODNAME is of the same class as
24 % the object OBJ.
25 %
26 % HELP CLASSNAME displays help for the fully qualified class CLASSNAME.
27 %
28 % HELP SYNTAX displays help describing the syntax used in MATLAB
29 % commands and functions.
30 %
31 % T = HELP('TOPIC') returns the help text for TOPIC as a string, with
32 % each line separated by /n. TOPIC is any allowable argument for HELP.
33 %
34 % REMARKS:
35 % 1. Use MORE ON before running HELP to pause HELP output after a
36 % screenful of text displays.
37 % 2. In the help syntax, function names are capitalized to make them
38 % stand out. In practice, always type function names in lowercase. For
39 % functions that are shown with mixed case (for example, javaObject)
40 % type the mixed case as shown.
41 % 3. Use DOC FUN to display help about the function in the Help
42 % browser, which might provide additional information, such as graphics
43 % and more examples.
44 % 4. Use DOC HELP for information about creating help for your own
45 % M-files.
46 % 5. Use HELPBROWSER to access online documentation in the Help
47 % browser. Use the Help browser Index or Search tabs to find more
48 % information about TOPIC or other terms.
49 %
50 % EXAMPLES:
51 % help close - displays help for the CLOSE function.
52 % help database/close - displays help for the CLOSE function in the
53 % Database Toolbox.
54 % help database - lists all functions in the Database Toolbox and
55 % displays help for the DATABASE function.
56 % help general - lists all functions in the directory MATLAB/GENERAL.
57 % t = help('close') - gets help for the function CLOSE and stores it as
58 % a string in t.
59 %
60 % See also DOC, DOCSEARCH, HELPBROWSER, HELPWIN, LOOKFOR, MATLABPATH,
61 % MORE, PARTIALPATH, WHICH, WHOS, CLASS.
62
63
64 % Copyright 1984-2005 The MathWorks, Inc.
65 % $Revision: 1.1.6.18 $ $Date: 2005/06/21 19:33:20 $
66
2 67 if nargin==0
68 topic = '';
2 69 else
2 70 topic = varargin{1};
2 71 end
72
73 % Workaround for a bug on the PC where anything ending in ':' is
74 % misinterpreted and causes all Contents.m help to be displayed.
2 75 if ispc && nargin>0 && length(topic)>0 && topic(length(varargin{1})) == ':'
76 topic = varargin{1};
77 if exist(topic,'dir')
78 varargin{1} = fullfile(topic, 'Contents.m');
79 builtin('helpfunc', varargin{:});
80 else
81 if nargout == 0
82 disp(sprintf('\n%s not found.\n', [topic '.m']));
83 else
84 varargout{1} = '';
85 end
86 return;
87 end
88 end
89
0.03 2 90 if nargout == 0
2 91 if ~usejava('jvm')
92 helpStr = getHelpText(varargin{:});
93 displayHelpText(helpStr);
94 % If there is no text, that means there's no help. We need to call the
95 % builtin so it actually prints out the proper message.
96 if isempty(helpStr)
97 builtin('helpfunc', varargin{:});
98 end
2 99 else
100 % Get the help text
0.03 2 101 helpStr = getHelpText(varargin{:});
102
103 % If there is no text, that means there's no help. We need to call the
104 % builtin so it actually prints out the proper message.
2 105 if isempty(helpStr)
106 builtin('helpfunc', varargin{:});
107
108 if feature('hotlinks')
109 disp(sprintf('Use the Help browser Search tab to <a href="matlab:docsearch %s">search the documentation</a>, or\ntype "<a href="matlab:help help">help help</a>" for help command options, such as help for methods.\n', topic));
110 else
111 disp(sprintf('Use the Help browser Search tab to search the documentation, or\ntype "help help" for help command options, such as help for methods.\n'));
112 end
113 return;
114 end
115
116 % display the help. We want hyperlinks if the hotlink feature is
117 % on, which will be true for example if the output is going to the
118 % command window.
0.08 2 119 displayHelp(helpStr, topic, feature('hotlinks'));
2 120 end
121 else
122 % Just return the help text.
123 [varargout{1:nargout}] = getHelpText(varargin{:});
124 end
125
Other subfunctions in this file are not included in this listing.