Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: A question about pattern

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53832] Re: [mg53815] A question about pattern
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 29 Jan 2005 06:02:40 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

sr=({a___,b_,c_,d___}/;c>b):>{a,2 b,3 c,d};

{a,3,2,d,e}/.sr

{a,3,2,d,e}

{a,2,3,d,e}/.sr

{a,4,9,d,e}


Bob Hanlon

> 
> From: Daohua Song <ds2081 at columbia.edu>
To: mathgroup at smc.vnet.net
> Date: 2005/01/28 Fri AM 02:44:04 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg53832] [mg53815] A question about pattern
> 
> Dear Group,
>       I am just struggling by the following question: I want to build a 
> rule like this,
>       List/.{a___,b_,c_?(#>b&),d___}->{a,2 b,3 c,d}
>       But it doesn't work.
> 
>       please help me! Thanks
> DHSONG
> 
> 


  • Prev by Date: Re: A question about pattern
  • Next by Date: Re: Nonlinear Curve Fitting
  • Previous by thread: Re: A question about pattern
  • Next by thread: Re: A question about pattern