MathGroup Archive 2006

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

Search the Archive

Re: Condition in replacement rule

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67776] Re: Condition in replacement rule
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 7 Jul 2006 07:12:51 -0400 (EDT)
  • References: <e8iqu6$s6p$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and

A[V, V] + A[V, X] /. A[V, W_] :> A[V, W] + B[W] /; W =!= V

??
Regards
   Jens

wandering.the.cosmos at gmail.com wrote:
> I have a replacement rule that goes like
> 
> A[V,W_] -> A[V,W] + B[W]
> 
> but I want to perform this replacement if and only if V and W are not
> the same. It seems
> 
> A[V,W_/;W!=V] -> A[V,W] + B[W]
> 
> does not seem to work. How should I do this?
> 
> Thanks!
> 


  • Prev by Date: Accuracy of Norm[{0``1}] is infinity?
  • Next by Date: 3D graphics headache
  • Previous by thread: Re: Condition in replacement rule
  • Next by thread: Subscript for a variable