MathGroup Archive 2006

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

Search the Archive

Re: Condition in replacement rule

  • To: mathgroup at smc.vnet.net
  • Subject: [mg67770] Re: Condition in replacement rule
  • From: dh <dh at metrohm.ch>
  • Date: Fri, 7 Jul 2006 07:12:36 -0400 (EDT)
  • References: <e8iqu6$s6p$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com


Hi,

Try:

A[V_, W_] /; UnsameQ[V, W] -> A[V, V] + B[W]



Daniel



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: RE: Subvalues and Parameters in Differentiation and Usage Messages
  • Next by Date: Accuracy of Norm[{0``1}] is infinity?
  • Previous by thread: RE: Condition in replacement rule
  • Next by thread: Re: Condition in replacement rule