Asked by Feng Zhou
on 14 Feb 2019 at 9:41

Normally, a set of equations that have the same number of unknowns can be solved. However, an complex eqaution with two unknowns are possible to be solved. For example, a complex equation like : x+y*j = a+ b*j, can be solved by x = a, and y = b, because the real part and imaginary part correspond to each other.

Now, my question is how to do it with MATLAB solve function. A typical scanerio is the propagation constant solution in EM wave. The original eqaution is:

Kc = omiga* sqrt(u*(eps-j*sigma/omiga));

we would like to solve the equation into Kc = k_real -j* k_img. k_real and k_img are the unknowns in the equation.

Answer by Torsten
on 14 Feb 2019 at 10:32

Edited by Torsten
on 14 Feb 2019 at 10:33

Does that help ?

>> syms z k

>> z0 = 1+3*1I;

>> a = solve(z==k*z0,z)

a = (sym) k*(1 + 3*I)

>> real(a)

ans = (sym) re(k) - 3*im(kc)

>> imag(a)

ans = (sym) 3*re(k) + im(kc)

madhan ravi
on 14 Feb 2019 at 11:06

I get the results like this. There are also something strange in my Matlab. I suppose there are something wrong in my MATLAB。

>> syms z k

>> z0 = 1+3*1i;

>> a = solve(z==k*z0,z)

a =

z

madhan ravi
on 14 Feb 2019 at 11:06

>> syms z complex

% ^^^^^^^---- add the assumption

>> syms k

>> z0 = 1+3*1i;

>> a = solve(z==k*z0,z)

a =

k*(1 + 3i)

>> real(a)

ans =

real(k) - 3*imag(k)

>> imag(a)

ans =

imag(k) + 3*real(k)

>>

Walter Roberson
on 14 Feb 2019 at 11:21

Sign in to comment.

Answer by Walter Roberson
on 14 Feb 2019 at 11:23

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 0 Comments

Sign in to comment.