Tagged Questions
2
votes
1answer
80 views
Optimizing a simple calculus using a list of matrices - Repeated dot product between a vector and a list of matrices [closed]
I want to make the following operation :
$$ \begin{bmatrix} \dot q_1\\\dot q_2 \end{bmatrix} + \begin{bmatrix} \begin{bmatrix} q_1 & q_2 \end{bmatrix} \mathbf A_1 \begin{bmatrix} q_1\\ q_2 ...
9
votes
2answers
203 views
Speed up 4D matrix/array generation
I have to fill a 4D array, whose entries are $\mathrm{sinc}\left[j(a-b)^2+j(c-d)^2-\phi\right]$ for a fixed value of $\phi$ (normally -15) and a fixed value of $j$ (normally about 0.00005). The way ...
8
votes
2answers
191 views
Correct way to generate large data sets (i.e.forward yield curve )
I would like to generate a set of forward yield curve matrix of size 1000 x 100. First I defined my SparseArray of 1000 x100:
...
1
vote
1answer
119 views
Optimization of correlation calculation
How can I make the following line of code run faster? Is there a way to do this calculation as a matrix vs vector than vector vs vector?
In the code below, f is a ...
10
votes
5answers
894 views
Best way to create symmetric matrices
From time to time I need to generate symmetric matrices with relatively expensive cost of element evaluation. Most frequently these are Gram matrices where elements are $L_2$ dot products. Here are ...
14
votes
2answers
475 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 MMA (which I found through this SO answer): essentially I want to differentiate noisy data. The full ...