idamnjanovic@10: %ROWLINCOMB Linear combination of matrix rows. idamnjanovic@10: % Y = ROWLINCOMB(X,A,ROWS) computes a linear combination of the rows of idamnjanovic@10: % the matrix A. The row indices are specified in the vector ROWS, and the idamnjanovic@10: % correspoinding coefficients are specified in the vector X. The vectors idamnjanovic@10: % ROWS and X must be of the same length. The call Y = ROWLINCOMB(X,A,ROWS) idamnjanovic@10: % is essentially equivalent to the command idamnjanovic@10: % idamnjanovic@10: % Y = X'*A(ROWS,:) . idamnjanovic@10: % idamnjanovic@10: % However, it is implemented much more efficiently. idamnjanovic@10: % idamnjanovic@10: % Y = ROWLINCOMB(X,A,ROWS,COLS) only works on the columns of A specified idamnjanovic@10: % in COLS, returning a vector of length equal to COLS. This call is idamnjanovic@10: % essentially equivalent to the command idamnjanovic@10: % idamnjanovic@10: % Y = X'*A(ROWS,COLS) . idamnjanovic@10: % idamnjanovic@10: % See also COLLINCOMB. 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