Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7644 > unrolled thread

Re: Rule replacement doesn't work after NDSolve?

Started byBill Rowe <readnews@sbcglobal.net>
First post2012-01-07 10:31 +0000
Last post2012-01-07 10:31 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Rule replacement doesn't work after NDSolve? Bill Rowe <readnews@sbcglobal.net> - 2012-01-07 10:31 +0000

#7644 — Re: Rule replacement doesn't work after NDSolve?

FromBill Rowe <readnews@sbcglobal.net>
Date2012-01-07 10:31 +0000
SubjectRe: Rule replacement doesn't work after NDSolve?
Message-ID<je96ts$j97$1@smc.vnet.net>
On 1/6/12 at 4:18 AM, g.crlsn@gmail.com (gac) wrote:

>I see that the FullForm[-2*I] is also not
>Times[Complex[-2,0],Complex[0,1]].

>So this won't work either:

>-2*I/.Complex[0,1]->Complex[0,-1]

>to replace only I with -I, we need to use parentheses:

>-2*(I/.I->-I)

No, it is not necessary to use parentheses. This works:

In[8]:= 2 I /. Complex[_, a_] -> -a I

Out[8]= -2 I

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web