[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: how to create sparse matrix in memory

**From**: |
octaveUser2M |

**Subject**: |
Re: how to create sparse matrix in memory |

**Date**: |
Tue, 16 Sep 2014 16:12:53 -0700 (PDT) |

Suggest:
-- Built-in Function: S = sparse (A)
-- Built-in Function: S = sparse (I, J, SV, M, N, NZMAX)
Create a sparse matrix from the full matrix or row, column, value
triplets. If A is a full matrix, convert it to a sparse matrix
representation, removing all zero values in the process.
Given the integer index vectors I and J, a 1-by-'nnz' vector of
real of complex values SV, overall dimensions M and N of the sparse
matrix. The argument 'nzmax' is ignored but accepted for
compatibility with MATLAB. If M or N are not specified their
values are derived from the maximum index in the vectors I and J as
given by 'M = max (I)', 'N = max (J)'.
A sparse matrix contains non-zero entries at particular (row, col)
indice-pairs; it is simply an efficient storage representation. The above
two built-in functions allow creation of a sparse matrix by specification of
A (which is not sparse), or I, J, SV, M, N, NZMAX (with meaning as indicated
above in the second paragraph). Either creation is done in memory and does
not involve write/load of a data file.
--
View this message in context:
http://octave.1599824.n4.nabble.com/how-to-create-sparse-matrix-in-memory-tp4666545p4666548.html
Sent from the Octave - General mailing list archive at Nabble.com.