Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #14280
| From | christopher arthur <chris.arthur1@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Sparse Array Question |
| Date | 2013-04-24 01:39 +0000 |
| Message-ID | <kl7d3o$kdc$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
Hello,
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
SparseArray
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
Cheers,
Chris
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Sparse Array Question christopher arthur <chris.arthur1@gmail.com> - 2013-04-24 01:39 +0000 Re: Sparse Array Question debguy <johnandsara2@cox.net> - 2013-04-24 11:02 +0000 Re: Sparse Array Question christopher arthur <chris.arthur1@gmail.com> - 2013-04-25 06:52 +0000 Re: Sparse Array Question Szabolcs Horvát <szhorvat@gmail.com> - 2013-04-25 06:51 +0000
csiph-web