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