MathGroup Archive 2008

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

Search the Archive

Re: Find / Replace in List problem ... v6.01

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84775] Re: Find / Replace in List problem ... v6.01
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Sun, 13 Jan 2008 06:26:52 -0500 (EST)
  • References: <fmcqcm$gaj$1@smc.vnet.net>

Lea Rebanks schrieb:
> Hi All,
>
> Given the following list in "modTotalDegrees" 
>
> I am trying to replace all elements with "22.5" with "18.434949".
> I having problems & cannot find the appropriate function / method to do
> this. I am using Mathematica version 6.01 on a PC.
> (Apologies for such a simple question.)
>
> Replace[modTotalDegrees90,22.5->18.434949]
> {22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45
> .,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0
> .,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,4
> 5.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,
> 0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,
> 45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5
> ,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5
> ,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.
> 5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.5,45.,67.5,0.,22.
> 5}
>
> Many thanks for your help & attention.
> Best Regards - Lea Rebanks...
>

Try:

modTotalDegrees/. 22.5->18.434949

you need as space after "/." to avoid Mathematica to assume you input the
number ".22"

Gruss Peter
-- 
==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==-==
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: Creating a set from two other sets
  • Next by Date: Keyboard shortcut
  • Previous by thread: Find / Replace in List problem ... v6.01
  • Next by thread: Re: Find / Replace in List problem ... v6.01