This is a static copy of a profile reportHome
help>displayHelp (2 calls, 0.078 sec)
Generated 15-Mar-2007 12:02:08 using real time.
M-subfunction in file C:\Program Files\MATLAB71\toolbox\matlab\helptools\help.m
[Copy to new window for comparing multiple runs]
Parents (calling functions)
Function Name | Function Type | Calls |
help | M-function | 2 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
138 | [pathname temp_topic] = filepa... | 2 | 0.031 s | 40.0% |  |
197 | disp(sprintf('\n')); | 2 | 0.016 s | 20.0% |  |
193 | helpStr = makehelphyper('help'... | 2 | 0.016 s | 20.0% |  |
169 | k = find(topic == '/' | topic ... | 2 | 0.016 s | 20.0% |  |
129 | spec_char = 0; | 2 | 0.000 s | 0.0% |  |
Other lines & overhead | | | 0 s | 0% |  |
Totals | | | 0.078 s | 100% | |
Children (called functions)
M-Lint results
Line number | Message |
130 | Use && instead of & as the AND operator in (scalar) conditional statements. |
Coverage results
[ Show coverage for parent directory ]
Total lines in file | 73 |
Non-code lines (comments, blank lines) | 23 |
Code lines (lines that can run) | 50 |
Code lines that did run | 25 |
Code lines that did not run | 25 |
Coverage (did run/can run) | 50.00 % |
Function listing
time calls line
126 function displayHelp(helpStr, topic, wantHyperlinks)
127
128 % note if it's a special character
< 0.01 2 129 spec_char = 0;
2 130 if length(topic)<=2 & isstrprop(topic, 'alphanum') == 0
131 spec_char = 1;
132 end
133
2 134 if (exist(topic,'builtin')==5)
135 topic = [topic '.m'];
136 end
137
0.03 2 138 [pathname temp_topic] = fileparts(topic);
139 % Is this a directory (regular or OOPS) with a Contents.m?
2 140 if exist(which(topic))~=2 && (exist(fullfile(topic,'Contents.m'),'file')==2 || exist(fullfile(pathname, ['@' temp_topic], 'Contents.m'),'file')==2) %#ok
141 pathname = topic;
142 topic = 'Contents.m';
2 143 elseif isempty(find(which(topic) == '@',1))
144 % This must be a file but not an OOPS object. Get the fileparts of the
145 % full pathname.
2 146 [pathname topic] = fileparts(which(topic));
2 147 end
148
2 149 if ~isempty(pathname)
150 % For MATLAB classes... check if there's a path to a class
2 151 [path_to_class classname] = fileparts(pathname);
2 152 if find(classname == '@') == 1
153 classname = classname(2:end);
154 if ~isempty(ismember(methods(classname), topic))
155 % If this is a member of a class, we need to find the prefix
156 % for the reference page link below.
157 [unused prefix] = fileparts(path_to_class); %#ok
158 topic = [prefix '/' topic];
159 end
160 end
2 161 end
162
2 163 if ~isempty(topic) && ~isempty(refPageUrl(topic))
164 % Show the reference page if it exists. If the topic contains at least
165 % one slash, it means they're looking under a product, and since the
166 % doc command only supports one level, we'll use the string before the
167 % first slash as the product directory, and the string after the last
168 % slash as the topic page. The rest will be ignored.
0.02 2 169 k = find(topic == '/' | topic == '\');
2 170 if ~isempty(k)
171 topic_dir = topic(1:k-1); % get the topic directory
172 topic_page = topic(k(end)+1:end); % get the topic page
173 if isempty(topic_dir)
174 topic = topic_page;
175 else
176 topic = [topic_dir '/' topic_page];
177 end
178 end
179
2 180 if wantHyperlinks
2 181 moreInfo = sprintf('\n Reference page in Help browser\n <a href="matlab:doc %s">doc %s</a>\n', topic, topic);
182 else
183 moreInfo = sprintf('\n Reference page in Help browser\n doc %s\n', topic);
184 end
2 185 helpStr = [helpStr moreInfo];
2 186 end
187
2 188 if wantHyperlinks
< 0.01 2 189 if spec_char == 1
190 topic = 'Contents.m';
191 end
192 % Make "see also", "overloaded methods", etc. hyperlinks.
0.02 2 193 helpStr = makehelphyper('help', pathname, topic, helpStr);
2 194 end
195
2 196 displayHelpText(helpStr);
0.02 2 197 disp(sprintf('\n'));
198
Other subfunctions in this file are not included in this listing.