Replacement rules for large matrixes

*To*: mathgroup at smc.vnet.net*Subject*: [mg119834] Replacement rules for large matrixes*From*: Gabriel Landi <gtlandi at gmail.com>*Date*: Fri, 24 Jun 2011 07:47:38 -0400 (EDT)

Greetings everyone. In some simulations I have been doing with Mathematica, I first set up a large symbolic sparse matrix (4000 x 4000). I don't have a simple set of array rules to do this. The matrix is generated by a somewhat complicated symbolic pattern matching. This takes around 5-10 seconds. The point is that, once it is set up I replace the symbolic values with different numerical values and compute quantities related to Eigenvalues and LinearSolve. My problem is that the replacement from symbolic to numeric also takes around 5 to 10 seconds. I was wondering if you guys had any advice on how to speed this up. I tried using Dispatch but it doesn't make a difference because the number of symbolic values to replace is small (usually 6). So my question is: starting with a sparse symbolic matrix dependent on a small number of parameters, what is the fastest way to generate a numerical matrix from it? Thanks in advance, Gabriel