This is a static copy of a profile reportHome
graphics/private/noselection (80 calls, 0.087 sec)
Generated 05-Aug-2011 13:01:33 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/private/noselection.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
34 | h = findobj(fig,'Selected','on... | 40 | 0.055 s | 62.5% |  |
48 | NoSelectedOriginalValues = [st... | 40 | 0.011 s | 12.5% |  |
20 | if nargin == 0 ... | 80 | 0.011 s | 12.5% |  |
53 | end | 40 | 0 s | 0% |  |
52 | set(orig.handles, {'Selected'}... | 40 | 0 s | 0% |  |
All other lines | | | 0.011 s | 12.5% |  |
Totals | | | 0.087 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
findobj | function | 40 | 0.055 s | 62.5% |  |
Self time (built-ins, overhead, etc.) | | | 0.033 s | 37.5% |  |
Totals | | | 0.087 s | 100% | |
Code Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 53 |
Non-code lines (comments, blank lines) | 25 |
Code lines (lines that can run) | 28 |
Code lines that did run | 20 |
Code lines that did not run | 8 |
Coverage (did run/can run) | 71.43 % |
Function listing
time calls line
1 function noselection( state, fig )
2 %NOSELECTION Select/Deselect all objects in Figure.
3 % NOSELECTION SAVE finds all objects with the Selected property
4 % of 'on'. Turns them all 'off'. Saves the handles so the Selected
5 % values can be restored. This is useful when printing so that we
6 % do not print the selection handles.
7 %
8 % NOSELECTION RESTORE returns any previously changed objects'
9 % Selected properties to their original values.
10 %
11 % NOSELECTION(...,FIG) operates on the specified figure.
12 %
13 % See also PRINT.
14
15 % Copyright 1984-2005 The MathWorks, Inc.
16 % $Revision: 1.5.4.6 $ $Date: 2008/04/11 15:37:32 $
17
80 18 persistent NoSelectedOriginalValues;
19
0.01 80 20 if nargin == 0 ...
21 || ~ischar( state ) ...
22 || ~(strcmp(state, 'save') || strcmp(state, 'restore'))
23 error('MATLAB:Print:noselectionNeedsSaveOrRestore', '%s needs to know if it should ''save'' or ''restore''', mfilename)
80 24 elseif nargin ==1
25 fig = gcf;
26 end
27
80 28 if strcmp( state, 'save' )
29 %Get all objects we need to change,
30 %be careful about setting root property back.
40 31 hiddenH = get(0,'showhiddenhandles');
40 32 set(0,'showhiddenhandles','on');
40 33 try
0.05 40 34 h = findobj(fig,'Selected','on');
40 35 err = 0;
36 catch ex
37 err = 1;
38 end
40 39 set(0,'showhiddenhandles', hiddenH)
40 40 if err
41 rethrow(ex)
42 end
43
40 44 storage.handles = h;
40 45 storage.origValue = get(h, {'Selected'});
40 46 set(h,'Selected','off');
47
0.01 40 48 NoSelectedOriginalValues = [storage NoSelectedOriginalValues];
40 49 else
40 50 orig = NoSelectedOriginalValues(1);
40 51 NoSelectedOriginalValues = NoSelectedOriginalValues(2:end);
40 52 set(orig.handles, {'Selected'}, orig.origValue);
40 53 end