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