This is a static copy of a profile report

Home

legendcolorbarlayout>layoutLegend (1 call, 0.010 sec)
Generated 28-Feb-2011 19:18:44 using cpu time.
M-subfunction in file /Applications/MATLAB_R2010a.app/toolbox/matlab/scribe/legendcolorbarlayout.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
legendcolorbarlayout>doInOutLayoutM-subfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
755
xyind = location_to_xy_index(l...
10.010 s100.0%
808
newpos(3:4) = legsize;
10 s0%
785
if xyind(1) == 3
10 s0%
784
newpos(2) = corners(2,2)+legsi...
10 s0%
783
if inner
10 s0%
All other lines  0 s0%
Totals  0.010 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
...ndcolorbarlayout>location_to_xy_indexM-subfunction10 s0%
Self time (built-ins, overhead, etc.)  0.010 s100.0%
Totals  0.010 s100% 
M-Lint results
No M-Lint 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 run15
Code lines that did not run39
Coverage (did run/can run)27.78 %
Function listing
   time   calls  line
754 function [newpos,corners] = layoutLegend(location,corners,origc,legsize,inner)
< 0.01 1 755 xyind = location_to_xy_index(location);
1 756 switch xyind(1)
1 757 case 1
758 newpos(1) = corners(1,1)-legsize(1);
759 corners(1,1) = newpos(1);
1 760 case 2
761 newpos(1) = corners(1,1);
762 if xyind(2) == 3
763 corners(1,1) = corners(1,1)+legsize(1);
764 end
1 765 case 3
766 newpos(1) = (corners(1,1) + corners(2,1))/2 - legsize(1)/2;
1 767 case 4
1 768 newpos(1) = corners(2,1)-legsize(1);
1 769 if xyind(2) == 3
770 corners(2,1) = corners(2,1)-legsize(1);
771 end
772 case 5
773 newpos(1) = corners(2,1);
774 corners(2,1) = corners(2,1)+legsize(1);
775 end
1 776 switch xyind(2)
1 777 case 1
778 newpos(2) = corners(2,2);
779 if xyind(1) == 3
780 corners(2,2) = newpos(2)-legsize(2);
781 end
1 782 case 2
1 783 if inner
1 784 newpos(2) = corners(2,2)+legsize(2);
1 785 if xyind(1) == 3
786 corners(2,2) = corners(2,2)+legsize(2);
787 end
788 else
789 newpos(2) = origc(2,2)+legsize(2);
790 end
791 case 3
792 newpos(2) = (corners(1,2) + corners(2,2))/2 + legsize(2)/2;
793 case 4
794 if inner
795 newpos(2) = corners(1,2);
796 if xyind(1) == 3
797 corners(1,2) = corners(1,2)-legsize(2);
798 end
799 else
800 newpos(2) = origc(1,2);
801 end
802 case 5
803 newpos(2) = corners(1,2)+legsize(2);
804 if xyind(1) == 3
805 corners(1,2) = newpos(2);
806 end
807 end
1 808 newpos(3:4) = legsize;

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