comparison examples/private/collincomb.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 %COLLINCOMB Linear combination of matrix columns.
2 % Y = COLLINCOMB(A,COLS,X) computes a linear combination of the columns of
3 % the matrix A. The column indices are specified in the vector COLS, and
4 % the correspoinding coefficients are specified in the vector X. The
5 % vectors COLS and X must be of the same length.
6 %
7 % The call Y = COLLINCOMB(A,COLS,X) is essentially equivalent to
8 %
9 % Y = A(:,COLS)*X .
10 %
11 % However, it is implemented much more efficiently.
12 %
13 % Y = COLLINCOMB(A,ROWS,COLS,X) only works on the rows of A specified
14 % in ROWS, returning a vector of length equal to ROWS. This call is
15 % essentially equivalent to the command
16 %
17 % Y = A(ROWS,COLS)*X .
18 %
19 % See also ROWLINCOMB.
20
21
22 % Ron Rubinstein
23 % Computer Science Department
24 % Technion, Haifa 32000 Israel
25 % ronrubin@cs
26 %
27 % April 2009