フィルターのクリア

Solve the complex equations

2 ビュー (過去 30 日間)
MANANJAYA NAYAK
MANANJAYA NAYAK 2022 年 10 月 9 日
コメント済み: MANANJAYA NAYAK 2022 年 10 月 9 日
2(x + j y) = 6− j 3
I coded it like:
syms x y
a=2*(x+y*j)==6-3j;
vpasolve(a,[x,y])
ans=
x : 3.0 - 1.5i
y : 0
but the result should come out as
x = 3.0 and
y = -1.5

採用された回答

Torsten
Torsten 2022 年 10 月 9 日
syms x real
syms y real
a=2*(x+y*j)==6-3j;
sol = solve(a,[x,y]);
sol.x
ans = 
3
sol.y
ans = 
  1 件のコメント
MANANJAYA NAYAK
MANANJAYA NAYAK 2022 年 10 月 9 日
Thank you for ....

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2022 年 10 月 9 日
What if you just add on
x = real(x)
y = imag(x)
  1 件のコメント
Torsten
Torsten 2022 年 10 月 9 日
It's just by chance that this works for the above example.

サインインしてコメントする。

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by