Mercurial > hg > smallbox
diff examples/private/collincomb.m @ 1:7750624e0c73 version0.5
(none)
author | idamnjanovic |
---|---|
date | Thu, 05 Nov 2009 16:36:01 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/private/collincomb.m Thu Nov 05 16:36:01 2009 +0000 @@ -0,0 +1,27 @@ +%COLLINCOMB Linear combination of matrix columns. +% Y = COLLINCOMB(A,COLS,X) computes a linear combination of the columns of +% the matrix A. The column indices are specified in the vector COLS, and +% the correspoinding coefficients are specified in the vector X. The +% vectors COLS and X must be of the same length. +% +% The call Y = COLLINCOMB(A,COLS,X) is essentially equivalent to +% +% Y = A(:,COLS)*X . +% +% However, it is implemented much more efficiently. +% +% Y = COLLINCOMB(A,ROWS,COLS,X) only works on the rows of A specified +% in ROWS, returning a vector of length equal to ROWS. This call is +% essentially equivalent to the command +% +% Y = A(ROWS,COLS)*X . +% +% See also ROWLINCOMB. + + +% Ron Rubinstein +% Computer Science Department +% Technion, Haifa 32000 Israel +% ronrubin@cs +% +% April 2009