This is a static copy of a profile report

Home

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)

Function NameFunction TypeCalls
graphics/private/preparehgfunction40
graphics/private/restorehgfunction40
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
34
h = findobj(fig,'Selected','on...
400.055 s62.5%
48
NoSelectedOriginalValues = [st...
400.011 s12.5%
20
if nargin == 0 ...
800.011 s12.5%
53
end
400 s0%
52
set(orig.handles, {'Selected'}...
400 s0%
All other lines  0.011 s12.5%
Totals  0.087 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
findobjfunction400.055 s62.5%
Self time (built-ins, overhead, etc.)  0.033 s37.5%
Totals  0.087 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function53
Non-code lines (comments, blank lines)25
Code lines (lines that can run)28
Code lines that did run20
Code lines that did not run8
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