This is a static copy of a profile reportHome
legend>check_legend_strings (2 calls, 0.010 sec)
Generated 18-Mar-2011 23:31:54 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/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 |
659 | set(ch(k),'DisplayName',str{k}... | 7 | 0.010 s | 100.0% |  |
663 | str = deblank(str); | 2 | 0 s | 0% |  |
662 | end | 2 | 0 s | 0% |  |
661 | end | 7 | 0 s | 0% |  |
660 | end | 7 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.010 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
isprop | M-function | 7 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.010 s | 100.0% |  |
Totals | | | 0.010 s | 100% | |
M-Lint 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 | 17 |
Code lines that did not run | 15 |
Coverage (did run/can run) | 53.12 % |
Function listing
time calls line
625 function [ch,str,msg]=check_legend_strings(ch,str,auto_children)
626
2 627 msg = '';
628 % expand strings if possible
2 629 if (length(ch) ~= 1) && (length(str) == 1) && (size(str{1},1) > 1)
630 str = cellstr(str{1});
631 end
632 % if empty, create strings
2 633 if isempty(str)
634 if auto_children && length(ch) > 50,
635 % only automatically add first 50 to cut down on huge lists
636 ch = ch(1:50);
637 end
638 for k=1:length(ch)
639 if isprop(ch(k),'DisplayName') &&...
640 ~isempty(get(ch(k),'DisplayName'))
641 str{k} = get(ch(k),'DisplayName');
642 else
643 str{k} = ['data',num2str(k)];
644 end
645 end
2 646 else
647 % trim children or strings
2 648 if length(str) ~= length(ch)
1 649 if ~auto_children || length(str) > length(ch)
650 msg.message = 'Ignoring extra legend entries.';
651 msg.identifier = id('IgnoringExtraEntries');
652 end
1 653 m = min(length(str),length(ch));
1 654 ch = ch(1:m);
1 655 str = str(1:m);
1 656 end
2 657 for k=1:length(ch)
7 658 if isprop(ch(k),'DisplayName')
0.01 7 659 set(ch(k),'DisplayName',str{k});
7 660 end
7 661 end
2 662 end
2 663 str = deblank(str);
Other subfunctions in this file are not included in this listing.