Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Modifying an entry in array specified by a list of arbitrary length

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127179] Modifying an entry in array specified by a list of arbitrary length
  • From: samid.hoda at gmail.com
  • Date: Wed, 4 Jul 2012 03:32:56 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Hi,

I want to edit an element whose position is specified by an arbitrary list that is a result of a computation (the list is not of fixed length). Something like 

i = {1,2,3}
Extract[X,i]+=1

except that Extract passes X by value instead of by reference. Anyone have any ideas?

Thanks,
Sam



  • Prev by Date: Re: Evaluate code fragment without making new cell for it?
  • Next by Date: Re: case of inconsistent API between Drop and Part?
  • Previous by thread: Re: Integration result depends on variable name / problem with
  • Next by thread: Re: Modifying an entry in array specified by a list of arbitrary length