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 commentaires

Azzi Abdelmalek
Azzi Abdelmalek le 19 Juin 2013
Modifié(e) : Azzi Abdelmalek le 19 Juin 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 le 20 Juin 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Mathematics dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by