comparison examples/private/rowlincomb.m @ 1:7750624e0c73 version0.5

(none)
author idamnjanovic
date Thu, 05 Nov 2009 16:36:01 +0000
parents
children
comparison
equal deleted inserted replaced
0:5181bee80bc1 1:7750624e0c73
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