Below is my code to try and solve this function:
D/(log10(RX*cfe)-C))^2 = cfe
I'm not sure if I'm using fsolve correctly. I get a value for cfe as 0.0016 but when I try to some validation by plotting two sides of the equation the curves cross at .0017377. That's about a 7% difference in values so I am questioning if I'm using fsove correctly.
I'm actually unsure of how to implement the initial guess which I call cfi.
I thought maybe adjusting the options would make the code run longer and would get a closer answer to the plotting method, but I'm not even sure if I'm doing that right.
Any direction would be helpful.
D = 0.242*(asin(AL)+asin(BE))/sqrt(E);
C = 1.26*log10(TWTD);
RX = 3.5e6
options = optimoptions('fsolve','FunctionTolerance',1.0000e-1);
cfi = .455/(log10(RX))^2.58;
f = @(cfe,cfi) (D/(log10(RX*cfi)-C))^2 - cfe;
fsol = fsolve(@(cfe) f(cfe,cfi),0,options);
syms cfe
eqnLeft = 0.242*(asin(AL)+asin(BE))/(log10(RX*cfe)-C);
eqnRight = sqrt(cfe)*sqrt(E);
fplot([eqnLeft eqnRight])
title([texlabel(eqnLeft) ' = ' texlabel(eqnRight)])