MathGroup Archive 2011

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

Search the Archive

Re: Convert Matrix to Sparse Matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119057] Re: Convert Matrix to Sparse Matrix
  • From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
  • Date: Sat, 21 May 2011 06:44:05 -0400 (EDT)

On Fri, 20 May 2011, Dominic Wörner wrote:

> Hi,
>
> I have big matrices with many zero elements. Calculating with them is
> very slow and I thought I could speed up the computations by converting
> them into sparse arrays.
> Is there function that does what I'm looking for?
>
> Cheers,
> Dominic=
>
>

Dominic,

you could use SparseArray[mat] to convert. But the you'd have create the 
dense matrix first. Presumably it is more efficient to directly create a 
sparse array.

Oliver


  • Prev by Date: Series[log[x], {x, 0, 3}]
  • Next by Date: Overloading functions
  • Previous by thread: Re: Convert Matrix to Sparse Matrix
  • Next by thread: Re: Convert Matrix to Sparse Matrix