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