Replacement/substitution by complex rules

Hello, is there any function that I can use to apply the complex rules for general use ?
For example, given a function --- abs(x+y)^2, we know this can be expressed in the following complex form : i.e.
abs(x+y)^2 = (x+y) * conj(x+y)
As far as I know, Mathematica has such function like
Abs[x_] -> Sqrt([x Conjugate[x]])
Therefore, I'm wondering if Matlab also provides has the replacement function similar to Mathematic's.
Any advice is highly appreciated. Many thanks in advance.

2 comentarios

Azzi Abdelmalek
Azzi Abdelmalek el 19 de Jun. de 2013
Editada: Azzi Abdelmalek el 19 de Jun. de 2013
What are *? if they are not part of your code, please remove them, also it's not clear for me what you are asking
MINGYEN CHEN
MINGYEN CHEN el 20 de Jun. de 2013
Thank you for reminding me of the redundant '*' in the above equations. They were added to bold the equations. (Apparently, they didn't work.) I now deleted them all.
Frankly speaking, I would like to substitute abs(z)^2 by (z)*conj(z) where z is any symbolic (complex) variable. It's for the next step that I'm going to view z and conj(z) as separate variables. As the results, I'm interested in such substitution in Matlab. I'm thinking if there is a way to replace abs(z)^2 symbolically in the form of (z)*conj(z), which is possible in Mathematica as '->' code. If it exists, please tell me.
Thanks a lot.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Preguntada:

el 19 de Jun. de 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by