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

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

Added original make3d

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