This is a static copy of a profile reportHome
workspacefunc>getShortValueObjectJ (7 calls, 0.000 sec)
Generated 05-Aug-2011 13:01:08 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/codetools/workspacefunc.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
233 | end | 3 | 0 s | 0% |  |
232 | retval = num2complex(var); | 3 | 0 s | 0% |  |
231 | if isempty(retval) | 7 | 0 s | 0% |  |
225 | if isa(var, 'function_handle')... | 7 | 0 s | 0% |  |
223 | end | 4 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 62 |
Non-code lines (comments, blank lines) | 14 |
Code lines (lines that can run) | 48 |
Code lines that did run | 22 |
Code lines that did not run | 26 |
Coverage (did run/can run) | 45.83 % |
Function listing
time calls line
175 function retval = getShortValueObjectJ(var, varargin)
7 176 if isempty(var)
177 if builtin('isnumeric', var)
178 retval = num2complex(var);
179 return;
180 end
181 if ischar(var)
182 retval = num2complex(var);
183 return;
184 end
185 end
186
7 187 try
188 % Start by assuming that we won't get anything back.
7 189 retval = '';
7 190 if ~isempty(var)
7 191 if islogical(var)
192 retval = num2complex(var);
193 end
7 194 end
195
7 196 if (ischar(var) && (ndims(var) == 2) && (size(var, 1) == 1))
197 % Show "single-line" char arrays, while establishing a reasonable
198 % truncation point.
4 199 if isempty(strfind(var, char(10))) && ...
200 isempty(strfind(var, char(13))) && ...
201 isempty(strfind(var, char(0)))
4 202 quoteStrings = true;
4 203 limit = 128;
4 204 optargin = size(varargin,2);
4 205 if (optargin > 0)
206 quoteStrings = varargin{1};
207 end
4 208 if (optargin > 1)
209 limit = varargin{2};
210 end
4 211 if numel(var) <= limit
4 212 if (quoteStrings)
4 213 retval = java.lang.String(['''' var '''']);
214 else
215 retval = java.lang.String(['' var '']);
216 end
217 else
218 retval = java.lang.String(...
219 sprintf('''%s...'' <Preview truncated at %s characters>', ...
220 var(1:limit), num2str(limit)));
221 end
4 222 end
4 223 end
224
7 225 if isa(var, 'function_handle') && numel(var) == 1
226 retval = java.lang.String(strtrim(evalc('disp(var)')));
227 end
228
229 % Don't call mat2str on an empty array, since that winds up being the
230 % char array "''". That looks wrong.
7 231 if isempty(retval)
3 232 retval = num2complex(var);
3 233 end
234 catch err %#ok<NASGU>
235 retval = java.lang.String(sprintf('<Error displaying value>'));
236 end
Other subfunctions in this file are not included in this listing.