This is a static copy of a profile report

Home

close>safegetchildren (19 calls, 0.022 sec)
Generated 05-Aug-2011 13:01:35 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/graphics/close.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
closefunction19
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
237
h = setdiff(h, filterFigs);
170.022 s100.0%
269
h = setdiff(h,filterFigs);
170 s0%
250
continue;
170 s0%
249
if ~isappdata(h(i), 'IgnoreClo...
170 s0%
248
for i =1:length(h)
170 s0%
All other lines  0 s0%
Totals  0.022 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
setdifffunction340.022 s100.0%
findobjfunction1190 s0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.022 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function63
Non-code lines (comments, blank lines)22
Code lines (lines that can run)41
Code lines that did run16
Code lines that did not run25
Coverage (did run/can run)39.02 %
Function listing
   time   calls  line
207 function h = safegetchildren(closeForce, closeAll, closeHidden)
208 % find all the figure children off root and filter out handles that
209 % based on application data or handle visibility.
19 210 if closeHidden || closeForce
211 h = allchild(0);
212 if ~closeAll && ~isempty(h)
213 h = h(1);
214 end
19 215 elseif closeAll
19 216 h = get(0,'Children');
217 else
218 h = get(0,'CurrentFigure');
219 end
19 220 if isempty(h)
2 221 return;
222 end
223
17 224 specialTags = {
225 'SFCHART', ...
226 'DEFAULT_SFCHART', ...
227 'SFEXPLR', ...
228 'SF_DEBUGGER', ...
229 'SF_SAFEHOUSE', ...
230 'SF_SNR', ...
231 'SIMULINK_SIMSCOPE_FIGURE'
232 };
17 233 filterFigs = [];
17 234 for j = 1:length(specialTags)
119 235 filterFigs = [filterFigs; findobj(h,'flat','tag',specialTags{j})]; %#ok
119 236 end
0.02 17 237 h = setdiff(h, filterFigs);
238
239 % If any of these figs have IgnoreCloseAll set to 1, they would
240 % override closeAll only. If it is set to 2, they would override
241 % closeAll and closeForce.
242
243 % IgnoreCloseAll [] 1 2
244 % closeAll close filter filter
245 % closeHidden close filter filter
246 % closeForce close close filter
17 247 filterFigs = [];
17 248 for i =1:length(h)
17 249 if ~isappdata(h(i), 'IgnoreCloseAll');
17 250 continue;
251 end
252 ignoreFlag = getappdata(h(i), 'IgnoreCloseAll');
253 if isempty(ignoreFlag) || ~isscalar(ignoreFlag) || ~isnumeric(ignoreFlag)
254 warning('MATLAB:close','Unrecognized value for IgnoreCloseAll - valid values are 1 or 2')
255 continue;
256 end
257 switch ignoreFlag
258 case 2
259 filterFigs = [filterFigs; h(i)]; %#ok
260 case 1
261 if ~closeForce
262 filterFigs = [filterFigs; h(i)]; %#ok
263 end
264 otherwise
265 warning('MATLAB:close','Unrecognized value for IgnoreCloseAll - valid values are 1 or 2')
266 % do nothing - unrecognized app data
267 end
268 end
17 269 h = setdiff(h,filterFigs);

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