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