I am not entirely sure what you are asking for. The sparse() command will convert a matrix to sparse form. [The spy() function is only for visualization.] Whether or not the matrix has a block format is not very relevant, because in sparse form, MATLAB stores the locations and values of the non-zero elements, regardless of where they are. (Or maybe I am misunderstanding something in your question.)
Best Answer