MathGroup Archive 2010

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

Search the Archive

SparseArray


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