This is a static copy of a profile report

Home

legendcolorbarlayout>layoutLegend (93 calls, 0.022 sec)
Generated 05-Aug-2011 13:03:17 using cpu time.
subfunction in file /usr/local/MATLAB/R2011a/toolbox/matlab/scribe/legendcolorbarlayout.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
legendcolorbarlayout>doInOutLayoutsubfunction93
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
762
xyind = location_to_xy_index(l...
930.011 s50.0%
815
newpos(3:4) = legsize;
930 s0%
803
if xyind(1) == 3
80 s0%
802
newpos(2) = corners(1,2);
80 s0%
801
if inner
80 s0%
All other lines  0.011 s50.0%
Totals  0.022 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...ndcolorbarlayout>location_to_xy_indexsubfunction930.011 s50.0%
Self time (built-ins, overhead, etc.)  0.011 s50.0%
Totals  0.022 s100% 
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function55
Non-code lines (comments, blank lines)1
Code lines (lines that can run)54
Code lines that did run22
Code lines that did not run32
Coverage (did run/can run)40.74 %
Function listing
   time   calls  line
761 function [newpos,corners] = layoutLegend(location,corners,origc,legsize,inner)
0.01 93 762 xyind = location_to_xy_index(location);
93 763 switch xyind(1)
93 764 case 1
765 newpos(1) = corners(1,1)-legsize(1);
766 corners(1,1) = newpos(1);
93 767 case 2
8 768 newpos(1) = corners(1,1);
8 769 if xyind(2) == 3
770 corners(1,1) = corners(1,1)+legsize(1);
771 end
85 772 case 3
773 newpos(1) = (corners(1,1) + corners(2,1))/2 - legsize(1)/2;
85 774 case 4
85 775 newpos(1) = corners(2,1)-legsize(1);
85 776 if xyind(2) == 3
777 corners(2,1) = corners(2,1)-legsize(1);
778 end
779 case 5
780 newpos(1) = corners(2,1);
781 corners(2,1) = corners(2,1)+legsize(1);
782 end
93 783 switch xyind(2)
93 784 case 1
785 newpos(2) = corners(2,2);
786 if xyind(1) == 3
787 corners(2,2) = newpos(2)-legsize(2);
788 end
93 789 case 2
85 790 if inner
85 791 newpos(2) = corners(2,2)+legsize(2);
85 792 if xyind(1) == 3
793 corners(2,2) = corners(2,2)+legsize(2);
794 end
795 else
796 newpos(2) = origc(2,2)+legsize(2);
797 end
8 798 case 3
799 newpos(2) = (corners(1,2) + corners(2,2))/2 + legsize(2)/2;
8 800 case 4
8 801 if inner
8 802 newpos(2) = corners(1,2);
8 803 if xyind(1) == 3
804 corners(1,2) = corners(1,2)-legsize(2);
805 end
806 else
807 newpos(2) = origc(1,2);
808 end
809 case 5
810 newpos(2) = corners(1,2)+legsize(2);
811 if xyind(1) == 3
812 corners(1,2) = newpos(2);
813 end
814 end
93 815 newpos(3:4) = legsize;

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