This is a static copy of a profile reportHome
legendcolorbarlayout>topixels (1 call, 0.000 sec)
Generated 28-Feb-2011 19:18:40 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)
Lines where the most time was spent
No measurable time spent in this functionLine Number | Code | Calls | Total Time | % Time | Time Plot |
1221 | p(:,2) = xvert(:,2) ./ w; | 1 | 0 s | 0% |  |
1220 | p(:,1) = xvert(:,1) ./ w; | 1 | 0 s | 0% |  |
1218 | xvert(ind,:) = 0; % set pixel ... | 1 | 0 s | 0% |  |
1217 | w(ind) = 1; % avoid divide by ... | 1 | 0 s | 0% |  |
1216 | ind = find(w==0); | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0 s | 0% | |
Children (called functions)
No childrenM-Lint results
No M-Lint messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 45 |
Non-code lines (comments, blank lines) | 10 |
Code lines (lines that can run) | 35 |
Code lines that did run | 17 |
Code lines that did not run | 18 |
Coverage (did run/can run) | 48.57 % |
Function listing
time calls line
1177 function p = topixels(ax, vert)
1178
1 1179 if strcmp(get(ax,'XScale'),'log')
1180 if all(get(ax,'XLim') > 0)
1181 vert(:,1) = log10(vert(:,1));
1182 else
1183 vert(:,1) = -log10(-vert(:,1));
1184 end
1185 end
1 1186 if strcmp(get(ax,'YScale'),'log')
1187 if all(get(ax,'YLim') > 0)
1188 vert(:,2) = log10(vert(:,2));
1189 else
1190 vert(:,2) = -log10(-vert(:,2));
1191 end
1192 end
1 1193 if strcmp(get(ax,'ZScale'),'log')
1194 if all(get(ax,'ZLim') > 0)
1195 vert(:,3) = log10(vert(:,3));
1196 else
1197 vert(:,3) = -log10(-vert(:,3));
1198 end
1199 end
1200 % Get needed transforms
1 1201 xform = get(ax,'x_RenderTransform');
1 1202 offset = get(ax,'x_RenderOffset');
1 1203 scale = get(ax,'x_RenderScale');
1204
1205 % Equivalent: nvert = vert/scale - offset;
1 1206 nvert(:,1) = vert(:,1)./scale(1) - offset(1);
1 1207 nvert(:,2) = vert(:,2)./scale(2) - offset(2);
1 1208 nvert(:,3) = vert(:,3)./scale(3) - offset(3);
1209
1210 % Equivalent xvert = xform*xvert;
1 1211 w = xform(4,1) * nvert(:,1) + xform(4,2) * nvert(:,2) + xform(4,3) * nvert(:,3) + xform(4,4);
1 1212 xvert(:,1) = xform(1,1) * nvert(:,1) + xform(1,2) * nvert(:,2) + xform(1,3) * nvert(:,3) + xform(1,4);
1 1213 xvert(:,2) = xform(2,1) * nvert(:,1) + xform(2,2) * nvert(:,2) + xform(2,3) * nvert(:,3) + xform(2,4);
1214
1215 % w may be 0 for perspective plots
1 1216 ind = find(w==0);
1 1217 w(ind) = 1; % avoid divide by zero warning
1 1218 xvert(ind,:) = 0; % set pixel to 0
1219
1 1220 p(:,1) = xvert(:,1) ./ w;
1 1221 p(:,2) = xvert(:,2) ./ w;