idamnjanovic@15: %SPROW Extract row of sparse matrix. idamnjanovic@15: % X = SPROW(A,J) where A is a sparse matrix, returns the nonzero values in idamnjanovic@15: % the row A(J,:). idamnjanovic@15: % idamnjanovic@15: % [X,ID] = SPROW(A,J) also returns the column indices of the nonzeros. idamnjanovic@15: % idamnjanovic@15: % Note that the call [X,ID] = SPROW(A,J) is equivalent (but more efficient idamnjanovic@15: % than) the Matlab code idamnjanovic@15: % idamnjanovic@15: % IDS = find(A(J,:)); idamnjanovic@15: % X = A(J,IDS); idamnjanovic@15: idamnjanovic@15: idamnjanovic@15: % Ron Rubinstein idamnjanovic@15: % Computer Science Department idamnjanovic@15: % Technion, Haifa 32000 Israel idamnjanovic@15: % ronrubin@cs idamnjanovic@15: % idamnjanovic@15: % August 2009