idamnjanovic@60: %SPROW Extract row of sparse matrix. idamnjanovic@60: % X = SPROW(A,J) where A is a sparse matrix, returns the nonzero values in idamnjanovic@60: % the row A(J,:). idamnjanovic@60: % idamnjanovic@60: % [X,ID] = SPROW(A,J) also returns the column indices of the nonzeros. idamnjanovic@60: % idamnjanovic@60: % Note that the call [X,ID] = SPROW(A,J) is equivalent (but more efficient idamnjanovic@60: % than) the Matlab code idamnjanovic@60: % idamnjanovic@60: % IDS = find(A(J,:)); idamnjanovic@60: % X = A(J,IDS); 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: % August 2009