This is a static copy of a profile report

Home

legendcolorbarlayout>topixels (130 calls, 0.033 sec)
Generated 05-Aug-2011 13:02:46 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>getPixelBoundssubfunction130
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
1210
scale = get(ax,'x_RenderScale'...
1300.022 s66.7%
1228
p(:,2) = xvert(:,2) ./ w;
1300.011 s33.3%
1227
p(:,1) = xvert(:,1) ./ w;
1300 s0%
1225
xvert(ind,:) = 0; % set pixel ...
1300 s0%
1224
w(ind) = 1; % avoid divide by ...
1300 s0%
All other lines  0 s0%
Totals  0.033 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function45
Non-code lines (comments, blank lines)10
Code lines (lines that can run)35
Code lines that did run25
Code lines that did not run10
Coverage (did run/can run)71.43 %
Function listing
   time   calls  line
1184 function p = topixels(ax, vert)
1185
130 1186 if strcmp(get(ax,'XScale'),'log')
6 1187 if all(get(ax,'XLim') > 0)
1188 vert(:,1) = log10(vert(:,1));
6 1189 else
6 1190 vert(:,1) = -log10(-vert(:,1));
6 1191 end
6 1192 end
130 1193 if strcmp(get(ax,'YScale'),'log')
6 1194 if all(get(ax,'YLim') > 0)
6 1195 vert(:,2) = log10(vert(:,2));
1196 else
1197 vert(:,2) = -log10(-vert(:,2));
1198 end
6 1199 end
130 1200 if strcmp(get(ax,'ZScale'),'log')
1201 if all(get(ax,'ZLim') > 0)
1202 vert(:,3) = log10(vert(:,3));
1203 else
1204 vert(:,3) = -log10(-vert(:,3));
1205 end
1206 end
1207 % Get needed transforms
130 1208 xform = get(ax,'x_RenderTransform');
130 1209 offset = get(ax,'x_RenderOffset');
0.02 130 1210 scale = get(ax,'x_RenderScale');
1211
1212 % Equivalent: nvert = vert/scale - offset;
130 1213 nvert(:,1) = vert(:,1)./scale(1) - offset(1);
130 1214 nvert(:,2) = vert(:,2)./scale(2) - offset(2);
130 1215 nvert(:,3) = vert(:,3)./scale(3) - offset(3);
1216
1217 % Equivalent xvert = xform*xvert;
130 1218 w = xform(4,1) * nvert(:,1) + xform(4,2) * nvert(:,2) + xform(4,3) * nvert(:,3) + xform(4,4);
130 1219 xvert(:,1) = xform(1,1) * nvert(:,1) + xform(1,2) * nvert(:,2) + xform(1,3) * nvert(:,3) + xform(1,4);
130 1220 xvert(:,2) = xform(2,1) * nvert(:,1) + xform(2,2) * nvert(:,2) + xform(2,3) * nvert(:,3) + xform(2,4);
1221
1222 % w may be 0 for perspective plots
130 1223 ind = find(w==0);
130 1224 w(ind) = 1; % avoid divide by zero warning
130 1225 xvert(ind,:) = 0; % set pixel to 0
1226
130 1227 p(:,1) = xvert(:,1) ./ w;
0.01 130 1228 p(:,2) = xvert(:,2) ./ w;