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

Azzi Abdelmalek
Azzi Abdelmalek 2013년 6월 19일
편집: Azzi Abdelmalek 2013년 6월 19일
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 2013년 6월 20일
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에 대해 자세히 알아보기

질문:

2013년 6월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by