This is NOT actually a sparse matrix. A sparse matrix in MATLAB is defined as such. If you use the sparse or spdiags functions to define that matrix, then the zero elements will not need to be stored, only the non-zeros. Of course, MATLAB knows how to work with these true sparse matrices in conjunction with other standard double arrays.
Finally, true sparse matrices are usually much more sparse than this, or you would not bother to use the sparse storage form at all.
Regardless, if you only want the non-zero elements of ANY matrix, then you can do this:
NZ = M(M ~= 0);
alternatively,
NZ = M(find(M));
Either will string out the non-zeros by columns, because that is how numbers are stored in a matrix in MATLAB.
NZ = M(find(M))
NZ =
-0.6
-0.6
1.8
-2.3
3.4
3.4
-3.8
-4.3
In your question, you asked for how to do this by rows, extracting the non-zero elements in the first row, then the second row, etc.
This is most simply done by transposing the array first. Thus, we might do something like...
NZ = M.';
NZ = NZ(find(NZ))
NZ =
-0.6
1.8
-2.3
3.4
-3.8
-4.3
-0.6
3.4
See that I used .' to do the transpose, just in case any elements were complex.