1function [A, Z] = mread (filename,prefer_binary) %#ok 2%MREAD read a sparse matrix from a file in Matrix Market format. 3% 4% Example: 5% A = mread (filename) 6% [A Z] = mread (filename, prefer_binary) 7% 8% Unlike MMREAD, only the matrix is returned; the file format is not 9% returned. Explicit zero entries can be present in the file; these are not 10% included in A. They appear as the nonzero pattern of the binary matrix Z. 11% 12% If prefer_binary is not present, or zero, a symmetric pattern-only matrix 13% is returned with A(i,i) = 1+length(find(A(:,i))) if it is present in the 14% pattern, and A(i,j) = -1 for off-diagonal entries. If you want the original 15% Matrix Market matrix in this case, simply use A = mread (filename,1). 16% 17% Compare with mmread.m at http://math.nist.gov/MatrixMarket 18% 19% See also load 20 21% Copyright 2006-2007, Timothy A. Davis, http://www.suitesparse.com 22 23error ('mread mexFunction not found') ; 24