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