idamnjanovic@10: %COLLINCOMB Linear combination of matrix columns. idamnjanovic@10: % Y = COLLINCOMB(A,COLS,X) computes a linear combination of the columns of idamnjanovic@10: % the matrix A. The column indices are specified in the vector COLS, and idamnjanovic@10: % the correspoinding coefficients are specified in the vector X. The idamnjanovic@10: % vectors COLS and X must be of the same length. idamnjanovic@10: % idamnjanovic@10: % The call Y = COLLINCOMB(A,COLS,X) is essentially equivalent to idamnjanovic@10: % idamnjanovic@10: % Y = A(:,COLS)*X . idamnjanovic@10: % idamnjanovic@10: % However, it is implemented much more efficiently. idamnjanovic@10: % idamnjanovic@10: % Y = COLLINCOMB(A,ROWS,COLS,X) only works on the rows of A specified idamnjanovic@10: % in ROWS, returning a vector of length equal to ROWS. This call is idamnjanovic@10: % essentially equivalent to the command idamnjanovic@10: % idamnjanovic@10: % Y = A(ROWS,COLS)*X . idamnjanovic@10: % idamnjanovic@10: % See also ROWLINCOMB. idamnjanovic@10: idamnjanovic@10: idamnjanovic@10: % Ron Rubinstein idamnjanovic@10: % Computer Science Department idamnjanovic@10: % Technion, Haifa 32000 Israel idamnjanovic@10: % ronrubin@cs idamnjanovic@10: % idamnjanovic@10: % April 2009