Please help with this quadratic equation

Hello everyone so i am trying to solve this equation in matlab:
X-(abs(X))^2 = -j0.4
how do I do this? i always get errors doesn't matter which method I tried.
TYVM

댓글 수: 2

Amit
Amit 2014년 1월 19일
what is j?
jason
jason 2014년 1월 19일
j is the symbol for imaginary part of a complex number

댓글을 달려면 로그인하십시오.

답변 (2개)

Mischa Kim
Mischa Kim 2014년 1월 19일
편집: Mischa Kim 2014년 1월 19일

0 개 추천

Use
syms X
solve(X - (abs(X))^2 + i*0.4)
Of course, you can also use j instead of i.

댓글 수: 2

jason
jason 2014년 1월 19일
so whether the absolute function is present or not makes no difference to the result?
Mischa Kim
Mischa Kim 2014년 1월 19일
Right you are. Misread. I fixed it above.

댓글을 달려면 로그인하십시오.

Roger Stafford
Roger Stafford 2014년 1월 19일

0 개 추천

You hardly need matlab to solve that problem. Rewrite it as:
z - abs(z)^2 = -j*.4
where z = x + j*y with x and y being the real and imaginary parts of z. This can be rewritten:
x + j*y - (x^2+y^2) = -.4*j
Now equate the real parts and imaginary parts of this equation:
y = -.4
x - x^2 - y^2 = x - x^2 - .16 = 0
From high school math there are two solutions to the second equation:
x = (1 +/- sqrt(1-4*.16))/2 = .8 or .2
Thus the two solutions are:
z = .8 - .4*j
z = .2 - .4*j

카테고리

질문:

2014년 1월 19일

답변:

2014년 1월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by