Skip to main content

Questions tagged [sparse-arrays]

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

5 votes
1 answer
138 views

Say I have this very sparse vector of gigantic size: ...
Henrik Schumacher's user avatar
3 votes
1 answer
98 views

BinCounts sometimes outputs data as SparseArray, and sometimes Normal. This does not depend ...
lesobrod's user avatar
  • 2,690
1 vote
2 answers
166 views

I want to create a large sparse matrix by given 2 matrices with dimensions of $m\times m$ and $n\times n$. It will not be $6\times 6$ as in the picture, I only tried to give a simple example. I do not ...
merts's user avatar
  • 105
4 votes
1 answer
292 views

People say that mathematica is not as good as matlab for nunmerics. For my specific use case, I am trying to solve differential equations with the MatrixExp method ...
Luca's user avatar
  • 444
1 vote
0 answers
137 views

My question is related to my issue from yesterday (Initializing very large matrices). It was recommended to use SparseArray to initialize large matrices efficiently....
Birgit1287's user avatar
3 votes
2 answers
198 views

Let's say I have a "small" SparseArray of any size, in the example $2\times2$ ...
rhermans's user avatar
  • 37.7k
3 votes
1 answer
151 views

I discovered a difference between version 12.0 and version 14.0 in how they handle SparseArray within the Table function. For ...
sidy's user avatar
  • 33
0 votes
0 answers
134 views

I need to construct large Hermitian matrices $H$, which can be built out of blocks. The matrix $H$ is of total size $Lx\times Ly$, with blocks of size $Ly$. For $Lx=5,\,Ly=3$ and $L=2$ (which is the ...
Kaio's user avatar
  • 85
3 votes
1 answer
268 views

I would like to solve a generalized eigenvalue problem involving sparse matrices using the Arnoldi method. I would like to use the Arnoldi method in the hope of speeding up the calculation. Problem is,...
coussin's user avatar
  • 453
6 votes
1 answer
80 views

I have some work that utilizes the "ExplicitPositions" property of Sparse Arrays that was at least available starting at version 13.0. However, I am trying to run some of my work on a ...
BioPhysicist's user avatar
  • 1,156
4 votes
2 answers
192 views

I am interested in speeding up as much as possible the dot product in the specific case of a multiplication of a $n\times n$ sparse hermitian matrix $H$ (where $n$ is typically large, let's say $\...
Matteo's user avatar
  • 315
6 votes
1 answer
198 views

Here is a snippet I use to dynamically define a bunch of functions f[i][x_]: ...
jrekier's user avatar
  • 525
7 votes
3 answers
291 views

Suppose I have several large, fixed, sparse matrices of real-valued entries. To make things simple, assume each is $n \times n$. I will multiply them, e.g., matA.matB.matC. Of course I can reduce ...
David G. Stork's user avatar
3 votes
2 answers
262 views

I would like to create the following sparse matrix \begin{equation} A = \begin{pmatrix} a1+b1 t & k-1 & 0 & \ldots &0 \\ a2^{2}+b2^{2} t & a1+b1t & k-2 & \ldots &0 \...
Shasa's user avatar
  • 1,085
5 votes
2 answers
307 views

I have a given SparseArray, let's call it A. I want to construct another SparseArray, let's call it B, which has the same "shape" as A. Right now, I construct B by applying a certain ...
coussin's user avatar
  • 453

15 30 50 per page
1
2 3 4 5
23