Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7644
| From | Bill Rowe <readnews@sbcglobal.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Rule replacement doesn't work after NDSolve? |
| Date | 2012-01-07 10:31 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <je96ts$j97$1@smc.vnet.net> (permalink) |
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Rule replacement doesn't work after NDSolve? Bill Rowe <readnews@sbcglobal.net> - 2012-01-07 10:31 +0000
csiph-web