Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Mathematica question.
Posted:
Dec 27, 1996 10:30 AM


Hi there guys...
I have the following problem under Mathematica 2.2:
I have a remplacement rule with condition to apply on an expression
Lets say that should replace a[i,j], b[i,j] ... f[i,j] apearing in an expression `ex` with zeroes whenever the condition
(i==0  i==1) && (j>=0 && j<=i+1) is fullfiled. since the general syntax is ex /. rules /; conditions, i'v typed:
ex /. {a[i_,j_]:>0, b[i_,j_]:>0, .. } /; the condition above.
Nothing, ` obsolete use of Condition`, Aperantly when using a list you can't use the condition,
Second attempt :
c:= (the condition)
ex /. a[i_,j_]:>0 /; c
Wont work! The function `Condition` has a HoldAll attribute so c isn't evaluated, even when trying ReleaseHold or Evaluate.
I can remove this attribute but fear that it would influence other calculations.
So, am i condamned to write this condition 6 times in order to make it work ??
Thanx. /\/\/\/\/\/\/\/\/\/\/\/>> Gadi ORON <<\/\/\/\/\/\/\/\/\/\/\/\/\  EMAIL : oron@pmmh.espci.fr :::: oron@clipper.ens.fr   Homepage : http://pmmh.espci.fr/home/oron/WWW/personal.html   fido : 2:325/302.8   Soyez braves  be brave.  /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



