Groups | Search | Server Info | Login | Register
Groups > comp.soft-sys.math.mathematica > #16825
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.ripco.com!news.glorb.com!newspump.sol.net!post2.nntp.sol.net!posts.news.twtelecom.net!nnrp3.twtelecom.net!not-for-mail |
|---|---|
| From | "Brambilla Roberto Luigi (RSE)" <Roberto.Brambilla@rse-web.it> |
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | R: complex conjugation by star |
| Date | Sun, 20 Apr 2014 08:46:27 +0000 (UTC) |
| Sender | steve@smc.vnet.net |
| Approved | Steven M. Christensen <steve@smc.vnet.net>, Moderator |
| Message-ID | <lj01h3$s44$1@smc.vnet.net> (permalink) |
| References | <20140418054638.0964A6A15@smc.vnet.net> |
| Lines | 51 |
| Organization | Time-Warner Telecom |
| NNTP-Posting-Date | 20 Apr 2014 08:52:34 GMT |
| NNTP-Posting-Host | cdf9cd05.news.twtelecom.net |
| X-Trace | DXC=obK3?GcUA>[QZDch=kU29[C_A=>8kQj6];[h;PUXBgbT?SWP;HjUf@VEFiONJ7[GoVO_kl[4RWN_R |
| X-Complaints-To | abuse@twtelecom.net |
| Xref | csiph.com comp.soft-sys.math.mathematica:16825 |
Show key headers only | View raw
Dear Dave,
many thanks again.
Now I have the problem to tell Mathematica that same variables are reals and have not to be 'starred' so that
(x+Iy+z)* is not x*+Iy*+z* but x-Iy+z* (if x and y are reals and z unknown. Command like Element[x, Reals]
does not work.
Sincerely yours Roberto
-----Messaggio originale-----
Da: Dave Snead [mailto:dsnead6@charter.net]
Inviato: venerd=EC 18 aprile 2014 09:30
A: Brambilla Roberto Luigi (RSE); mathgroup@smc.vnet.net
Oggetto: Re: complex conjugation by star
Rob --
This will give you what you want:
SuperStar[f_?NumberQ]:=Conjugate[f]
SuperStar[f:_[___]]:=SuperStar/@f
Cheers,
Dave Snead
-----Original Message-----
From: Brambilla Roberto Luigi (RSE)
Sent: Thursday, April 17, 2014 10:46 PM
Subject: complex conjugation by star
I have defined the following useful star complex-conjugation (common star exponent notation)
f_*:=f/.Complex[u_,v_]->Complex[u,-v]
and it works fine. For example BesselJ[2,x+I y]* gives BesselJ[2,x-I y] etc. ..(x,y defined/undefined).
Also it is listable on number lists
{1+i2, 5+i6}* gives {1-i2, 5-i6} .
Unfortunately it does not work on symbols, i.e.
A* gives A even if I have defined A as a complex number by means of Element[A, Complexes].
Similarly if I define Element[{A,B,G}, Complexes]
{A,B,G}* gives {A,B,G} and (A+B+G)* gives A+B+G.
I'd like to obtain {A*,B*,G*} and A*+B*+G* ( ! )
Is it possible to fix this deficiency, unpleasant in manipulating general expressions where is not known if symbols represent real or complex variables?
Many thanks!
Rob
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
R: complex conjugation by star "Brambilla Roberto Luigi (RSE)" <Roberto.Brambilla@rse-web.it> - 2014-04-20 08:46 +0000
csiph-web