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

 Respuesta aceptada

Torsten
Torsten el 9 de Oct. de 2022
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 = 

Más respuestas (1)

Image Analyst
Image Analyst el 9 de Oct. de 2022

0 votos

What if you just add on
x = real(x)
y = imag(x)

1 comentario

Torsten
Torsten el 9 de Oct. de 2022
It's just by chance that this works for the above example.

Iniciar sesión para comentar.

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Preguntada:

el 9 de Oct. de 2022

Comentada:

el 9 de Oct. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by