Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.symbolic.independent

Topic: Mathematica question.
Replies: 1   Last Post: Jan 1, 1997 4:08 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Gadi Oron

Posts: 19
Registered: 12/8/04
Mathematica question.
Posted: Dec 27, 1996 10:30 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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. |
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.