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