source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/scale_cols.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 272 bytes
Line 
1function 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
7y = x.*repmat(s(:)', rows(x), 1);
8%y = x.*(ones(rows(x),1)*s(:)');
Note: See TracBrowser for help on using the repository browser.