MathGroup Archive 2010

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

Search the Archive

Re: Select list elements and exchange them

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109822] Re: Select list elements and exchange them
  • From: dh <dh at metrohm.com>
  • Date: Wed, 19 May 2010 07:02:53 -0400 (EDT)
  • References: <hstp64$mbi$1@smc.vnet.net>

Hi,
this is easily done using ReplaceAll and pattern matching;
testList /. {_, {3, 4}} -> {100, {3, 4}}
cheers, Daniel

Am 18.05.2010 12:12, schrieb ishii.mitsuo.titanium at nsc.co.jp:
> testList={ {11,{2,3}},{21,{3,4}},{34,{5,6}},{51,{7,8}} }


-- 

Daniel Huber
Metrohm Ltd.
Oberdorfstr. 68
CH-9100 Herisau
Tel. +41 71 353 8585, Fax +41 71 353 8907
E-Mail:<mailto:dh at metrohm.com>
Internet:<http://www.metrohm.com>



  • Prev by Date: Numerical solution of differential equation with boundary values
  • Next by Date: Equals, Less, Greater, etc; Confused by this simple output.
  • Previous by thread: Select list elements and exchange them
  • Next by thread: Re: Select list elements and exchange them