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 个评论

What are *? if they are not part of your code, please remove them, also it's not clear for me what you are asking
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.

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by