MathGroup Archive 2013

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

Search the Archive

Sparse Array Question

  • To: mathgroup at
  • Subject: [mg130578] Sparse Array Question
  • From: christopher arthur <chris.arthur1 at>
  • Date: Tue, 23 Apr 2013 00:04:24 -0400 (EDT)
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Delivered-to:
  • Reply-to: chris.arthur1 at


I have a list of rules for defining a SparseArray.  The list has some 
coordinates repeated with different values.  If a coordinate appears in 
the list more than once, I want to sum up the values, and then have a 

i.e., if my list were myList={{1,1}->1,{2,1}->2,{1,1}->3} then my 
SparseArray should have {1,1}->4.  I've tried using ReplacePart on an 
array to say myArray=ReplacePart[myArray,...] but this seems horribly 
inefficient as a way to change values in an array.

I'm using Mathematica 5.2



  • Prev by Date: Re: Converting a magnified image of a line to a single
  • Next by Date: Re: cannot work a "conditional If"
  • Previous by thread: Re: cannot work a "conditional If"
  • Next by thread: Re: Sparse Array Question