annotate examples/private/collincomb.m @ 1:7750624e0c73 version0.5

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