The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ??

/\/\/\/\/\/\/\/\/\/\/\/>> Gadi ORON <<\/\/\/\/\/\/\/\/\/\/\/\/\
| EMAIL : :::: |
| Homepage : |
| 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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.