gf_spmat
Purpose
Synopsis
Description
M=gf_spmat('empty', m, n) : create a new empty (i.e. full of zeros) sparse matrix, of dimensions m×n. If n is ommited, the matrix dimension is m×m.
M=gf_spmat('identity', n) : create a n×n identity matrix.
M=gf_spmat('copy', K [, I [, J]]) : duplicate a matrix K (which might be a gfSpmat or a native matlab sparse matrix). If I and/or J are given, the matrix M will be a submatrix of K. For example M = gf_spmat('copy', sprand(50,50,.1), 1:40, [6 7 8 3 10]) will return a 40x5 matrix.
M=gf_spmat('mult', A, B) : create a sparse matrix as the product of the sparse matrices A and B. It requires that A and B be both real or both complex, you may have to use gf_spmat_set(..,'to_complex')
M=gf_spmat('add', @spmat A, @spmat B) : create a sparse matrix as the sum of the sparse matrices A and B. Adding a real matrix with a complex matrix is possible.
M=gf_spmat('hb', filename) or gf_spmat('harwell-boeing', filename) read a sparse matrix from an Harwell-Boeing file.
M=gf_spmat('mm', filename) or gf_spmat('matrix-market', filename) read a sparse matrix from a Matrix-Market file.
