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