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