This is a static copy of a profile reportHome
legend>check_legend_strings (14 calls, 0.022 sec)
Generated 05-Aug-2011 13:02:35 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/legend.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 |
657 | if isprop(ch(k),'DisplayName') | 55 | 0.011 s | 50.0% |  |
626 | msg = ''; | 14 | 0.011 s | 50.0% |  |
662 | str = deblank(str); | 14 | 0 s | 0% |  |
661 | end | 14 | 0 s | 0% |  |
660 | end | 55 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.022 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
isprop | function | 55 | 0.011 s | 50.0% |  |
Self time (built-ins, overhead, etc.) | | | 0.011 s | 50.0% |  |
Totals | | | 0.022 s | 100% | |
Code Analyzer results
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 39 |
Non-code lines (comments, blank lines) | 7 |
Code lines (lines that can run) | 32 |
Code lines that did run | 12 |
Code lines that did not run | 20 |
Coverage (did run/can run) | 37.50 % |
Function listing
time calls line
624 function [ch,str,msg]=check_legend_strings(ch,str,auto_children)
625
0.01 14 626 msg = '';
627 % expand strings if possible
14 628 if (length(ch) ~= 1) && (length(str) == 1) && (size(str{1},1) > 1)
629 str = cellstr(str{1});
630 end
631 % if empty, create strings
14 632 if isempty(str)
633 if auto_children && length(ch) > 50,
634 % only automatically add first 50 to cut down on huge lists
635 ch = ch(1:50);
636 end
637 for k=1:length(ch)
638 if isprop(ch(k),'DisplayName') &&...
639 ~isempty(get(ch(k),'DisplayName'))
640 str{k} = get(ch(k),'DisplayName');
641 else
642 str{k} = ['data',num2str(k)];
643 end
644 end
14 645 else
646 % trim children or strings
14 647 if length(str) ~= length(ch)
648 if ~auto_children || length(str) > length(ch)
649 msg.message = 'Ignoring extra legend entries.';
650 msg.identifier = id('IgnoringExtraEntries');
651 end
652 m = min(length(str),length(ch));
653 ch = ch(1:m);
654 str = str(1:m);
655 end
14 656 for k=1:length(ch)
0.01 55 657 if isprop(ch(k),'DisplayName')
55 658 set(ch(k),'DisplayName',str{k});
55 659 end
55 660 end
14 661 end
14 662 str = deblank(str);
Other subfunctions in this file are not included in this listing.