This is a static copy of a profile report

Home

graphics/private/restoreui (40 calls, 0.000 sec)
Generated 05-Aug-2011 13:03:32 using cpu time.
function in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/private/restoreui.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
graphics/private/restorehgfunction40
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
30
return
400 s0%
29
if isempty( pj.UIData )
400 s0%
21
if ~isequal(size(Fig), [1 1]) ...
400 s0%
17
if (~useOriginalHGPrinting())
400 s0%
15
error( nargchk(2,2,nargin) )
400 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
graphics/private/isfigurefunction400 s0%
graphics/private/useOriginalHGPrintingfunction400 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0 s0% 
Code Analyzer results
Line numberMessage
21Use || instead of | as the OR operator in (scalar) conditional statements.
41To improve performance, use logical indexing instead of FIND.
Coverage results
[ Show coverage for parent directory ]
Total lines in function48
Non-code lines (comments, blank lines)25
Code lines (lines that can run)23
Code lines that did run5
Code lines that did not run18
Coverage (did run/can run)21.74 %
Function listing
   time   calls  line
1 function pj = restoreui( pj, Fig )
2 %RESTOREUI Remove Images used to mimic user interface controls in output.
3 % When printing a Figure with Uicontrols, the user interface objects
4 % can not be drawn in the output. So Images were created to fill in
5 % for the Uicontrols in the output. We now remove those Images.
6 %
7 % Ex:
8 % pj = RESTOREUI( pj, h ); %removes Images from Figure h, modifes pj
9 %
10 % See also PRINT, PRINTOPT, PREPAREUI, RESTORE, RESTOREUI.
11
12 % Copyright 1984-2009 The MathWorks, Inc.
13 % $Revision: 1.6.4.5 $ $Date: 2009/12/28 04:17:51 $
14
40 15 error( nargchk(2,2,nargin) )
16
40 17 if (~useOriginalHGPrinting())
18 error('MATLAB:Print:ObsoleteFunction', 'The function %s should only be called when original HG printing is enabled.', upper(mfilename));
19 end
20
40 21 if ~isequal(size(Fig), [1 1]) | ~isfigure( Fig )
22 error('MATLAB:print:InvalidHandle', 'Need a handle to a Figure object.' )
23 end
24
25
26 %UIData is empty if never saved mimiced any controls because
27 %user requested we don't print them or becaus ef previously
28 %found and reported problems.
40 29 if isempty( pj.UIData )
40 30 return
31 end
32
33 if ~strcmp(get(Fig, 'Visible'), pj.UIData.OldFigVisible)
34 set( Fig, 'Visible', pj.UIData.OldFigVisible );
35 end
36
37 if ~isempty(pj.UIData.UICHandles)
38 set(pj.UIData.UICHandles,{'Units'},pj.UIData.UICUnits);
39 set(pj.UIData.UICHandles,'visible','on');
40 end
41 delete(pj.UIData.AxisHandles(find(ishandle(pj.UIData.AxisHandles))));
42 set(Fig, 'Colormap', pj.UIData.OldFigCMap );
43
44 if pj.UIData.MovedFigure
45 set(Fig, 'Position', pj.UIData.OldFigPosition );
46 end
47
48 pj.UIData = [];

Other subfunctions in this file are not included in this listing.