annotate Problems/private/rowlincomb.m @ 10:207a6ae9a76f version1.0

(none)
author idamnjanovic
date Mon, 22 Mar 2010 15:06:25 +0000
parents
children
rev   line source
idamnjanovic@10 1 %ROWLINCOMB Linear combination of matrix rows.
idamnjanovic@10 2 % Y = ROWLINCOMB(X,A,ROWS) computes a linear combination of the rows of
idamnjanovic@10 3 % the matrix A. The row indices are specified in the vector ROWS, and the
idamnjanovic@10 4 % correspoinding coefficients are specified in the vector X. The vectors
idamnjanovic@10 5 % ROWS and X must be of the same length. The call Y = ROWLINCOMB(X,A,ROWS)
idamnjanovic@10 6 % is essentially equivalent to the command
idamnjanovic@10 7 %
idamnjanovic@10 8 % Y = X'*A(ROWS,:) .
idamnjanovic@10 9 %
idamnjanovic@10 10 % However, it is implemented much more efficiently.
idamnjanovic@10 11 %
idamnjanovic@10 12 % Y = ROWLINCOMB(X,A,ROWS,COLS) only works on the columns of A specified
idamnjanovic@10 13 % in COLS, returning a vector of length equal to COLS. This call is
idamnjanovic@10 14 % essentially equivalent to the command
idamnjanovic@10 15 %
idamnjanovic@10 16 % Y = X'*A(ROWS,COLS) .
idamnjanovic@10 17 %
idamnjanovic@10 18 % See also COLLINCOMB.
idamnjanovic@10 19
idamnjanovic@10 20
idamnjanovic@10 21 % Ron Rubinstein
idamnjanovic@10 22 % Computer Science Department
idamnjanovic@10 23 % Technion, Haifa 32000 Israel
idamnjanovic@10 24 % ronrubin@cs
idamnjanovic@10 25 %
idamnjanovic@10 26 % April 2009