MathGroup Archive 2010

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

Search the Archive


  • To: mathgroup at
  • Subject: [mg109065] SparseArray
  • From: Mala Jozsef <mala_jozsef at>
  • Date: Mon, 12 Apr 2010 06:53:59 -0400 (EDT)

Hi, I would like to use SparseArray for large matrices and would like to use members of a list when giving values to the entries.Here is a simple example: l=={1};
SparseArray[{i_,i_}-> l[[i]],{1,1}]

Part::pspec: Part specification i is neither an integer nor a list of integers.
SparseArray[< 1 >,{1,1}]

In fact it works if there are at most three list in the definition. Is there a solution without error messages? Thanks, Jozsef

  • Prev by Date: Re: Format InputField -> Right ?
  • Next by Date: ArrayPlot with inverted ColorFunction depending on MaxPlotPoints
  • Previous by thread: norm Function with FindRoot
  • Next by thread: Re: SparseArray