Questions tagged [sparse-arrays]

Questions on the construction and manipulation of sparse arrays in Mathematica, with functions like SparseArray[] and Band[].

Filter by
Sorted by
Tagged with
19
votes
3answers
1k views

Using ReplaceAll on SparseArray

I'm using SparseArray in a notebook in which I am doing complex conjugation manually, i.e. writing $\sqrt{-1}$ as i and applying ...
11
votes
2answers
815 views

Speeding up construction of simple tridiagonal matrix

I have the following code to construct a tridiagonal matrix: ...
3
votes
1answer
470 views

Efficiently importing XPM matrix data into Mathematica

The XPM file format is an image file format. Although it is primarily intended for icon pixmaps, it can also be used to store matrix data. For example, the GROMACS chemical simulation package uses ...
9
votes
1answer
2k views

Exporting a Large Multidimensional Sparse Array

I'm trying to export a sparse array from Mathematica to share with collaborators who primarily use Matlab. The sparse array in question is 4 dimensional, (72 x 93 x 94 x 172) with ~4M non-zero ...
8
votes
1answer
659 views

How to produce the ILU0 or ILUT as stand-alone procedures on sparse matrices?

Mathematica uses the ILU0 procedures automatically to precondition large sparse linear systems; e.g. ...
4
votes
3answers
659 views

Support for Compressed Sparse Column sparse matrix representation

Is there native support for Compressed Sparse Column (CSC) format for sparse matrices, like importing and manipulating them?
26
votes
2answers
2k views

Using the Krylov method for Solve: Speeding up a SparseArray calculation

I'm trying to implement this Total Variation Regularized Numerical Differentiation (TVDiff) code in Mathematica (which I found through this SO answer): essentially, I want to differentiate noisy data. ...
10
votes
2answers
1k views

Efficient by-element updates to SparseArrays

I have a very large SparseArray called A. What is the most efficient way to update say element ...
20
votes
3answers
2k views

Efficient way to combine SparseArray objects?

I have several SparseArray objects, say sa11, sa12, sa21, sa22, which I would like to combine into the equivalent of {{sa11, sa12}, {sa21, sa22}}. As an example, I ...

1 2 3 4 5
6