I'm running across a problem in which Matlab seems to have two ways of reading its sparse matrix format. There's a short example at the end. If anyone else has seen anything like it and/or knows what might be causing it, I'd like to know. B is a sparse matrix returned by a mex file. If I convert B into a full matrix and then back to a sparse matrix, the problem disappears. I only see this problem with certain matrices (e.g. upper triangular).