MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Replacement rules for large matrixes

  • To: mathgroup at
  • Subject: [mg119834] Replacement rules for large matrixes
  • From: Gabriel Landi <gtlandi at>
  • 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

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

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,


  • Prev by Date: Re: RevolutionPlot3D Help
  • Next by Date: Re: Export a Grid[] object without loosing it's format
  • Previous by thread: Re: Is a conditional evaluation of sections of a notebook possible?
  • Next by thread: Re: Replacement rules for large matrixes