A way around the limitations of Re[] and Im[]
- To: mathgroup at smc.vnet.net
- Subject: [mg51086] A way around the limitations of Re[] and Im[]
- From: carlos at colorado.edu (Carlos Felippa)
- Date: Mon, 4 Oct 2004 06:17:51 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
As you know, Re[expr] and Im[expr] are left unevaluated when expr is not numeric. I had good luck in simple cases with the following substitution trick: Real[c_]:=c/.I->0; Imag[c_]:=(c-Real[c])/.I->1; Do you see any problem with these definitions?