source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/scale_rows.m
@
177
Last change on this file since 177 was 37, checked in by , 15 years ago | |
---|---|
File size: 265 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function y = scale_rows(x,s) |
2 | % SCALE_ROWS Scale each row of a matrix. | |
3 | % SCALE_ROWS(x,s) returns matrix y, same size as x, such that | |
4 | % y(i,:) = s(i)*x(i,:) | |
5 | % It is more efficient than diag(s)*x. | |
6 | ||
7 | y = repmat(s(:), 1, cols(x)).*x; | |
8 | %y = (s(:)*ones(1,cols(x))).*x; |
Note: See TracBrowser
for help on using the repository browser.