Hey Im having real struggle in solving a set of equation which in the beginning looked pretty straight forward, but as I am no Matlab-Hero yet I kinda saw no other way than to ask the community.. I probably miss something which could be pretty obvious and very wrong in my beliefs on how matlab eqations work:
The project is about measuring the reflection coefficient with an open ended coaxial probe and generate an approximation of the complex permittivity using the Debye model for permittity (eq.) (work based on Radim Zajícek et al. 2010, https://www.radioeng.cz/fulltexts/2008/08_01_14_19.pdf).
First, the reflection coefficient S11 of a sample with known permittivity (distilled water) is measured over a range of frequency and the admittance of the setup is calculated (eq. ). Second step would be inserting the permittivity model in eq.  and equal it with the meassured admittance in order to get the constants G0 and C0. For this, it is crucial to split the real and imaginary part of the equation, so that we get two real nonlinear equations for two real unknowns and . Eventually, one should be able to measure S11 and compute complex permittivity in approximation by solving the unknown real and imaginary part of the complex permittivity (CAVE: 5th order equation in terms of (and the whole simplified math being within a certain range of error I am aware of that comodity).
i being the complex unit
w being angular frequency
water parameters at 30° C:
optical permittivity at high frequencies = 4.6
static permittivity at low frequencies = 78.3
electrical relaxation time of water = 8.07ps
where I am struggling is the splitting of the real and imaginary part of the eq.  and the solving. If I let Matlab compute it, there is always some nasty junk of complex i in the real part and vice versa.
Z0 = 50;
Y0 = 1/Z0;
e_inf = 4.6; % optical permittivity at high frequencies
e_s = 78.3; % static permittivity at low frequencies
tau = 8.07e-12; % electrical relaxation time of distilled water (T=30°C)
Y_m = Y0.*((1-water_s11)./(1+water_s11)); %m for measured s for simulated
Y_s = G0.*ec_water.^(5/2)+1i.*w.*ec_water.*C0;
Y_sr = real(Y_s);
Y_si = imag(Y_s);
Y_mr = real(Y_m);
Y_mi = imag(Y_m);
G0 = solve(Y_mr(1) == Y_sr(1), G0); %this surely is wrong but i dont know how to solve it
C0 = solve(Y_mi(1) == Y_si(1), C0); %I compute here only for the first element cause otherwise it would take forever
So, if you'd compute this, you get emtpy 0-by-1 symbolics for G0 and C0; also there will be expressions like imag(C0) in the supposed real part of the Y_sr and Y mr..
update (12.03. 1600): if i now compute, the splitting still doesn't work but there are some values in G0/C0 but involving the other variable as well
my thinking was kinda: problem is, that with being a complex number and in the real part of the equation multiplied with G0, some complex i has to probably stick with it, unless it doesn't disapear on account of mathematical tricks physical coincidences (if there are such things?)
If anyone had some input I'd be very greatful - just a learning student :)