a=9.61;
b=0.16;
fc=2000*10^6;
c=300*10^6;
A= 10^(1/10)-10^(20/10);
B=(20*log10(4*pi*fc/c))+10^(20/10);
syms R real;
y=(A/(1+a*exp(-b*(atand(500/R)-a))))+20*log10(R/(cosd(atand(500/R))))+(B)-10^10==0
sol=solve(y,R)
This is my scropt. I want to solve this equation, But mine gives me an Empty sym: 0-by-1 error whenever I try to run it.
Please help me

 Réponse acceptée

a=9.61;
b=0.16;
fc=2000*10^6;
c=300*10^6;
A= 10^(1/10)-10^(20/10);
B=(20*log10(4*pi*fc/c))+10^(20/10)
B = 138.4624
syms R real;
y=(A/(1+a*exp(-b*(atand(500/R)-a))))+20*log10(R/(cosd(atand(500/R))))+(B)-10^10
y = 
yfcn = matlabFunction(y)
yfcn = function_handle with value:
@(R)(log(R.*sqrt(1.0./R.^2.*2.5e+5+1.0)).*2.0e+1)./log(1.0e+1)-9.874107458820583e+1./(exp((atan(5.0e+2./R).*(-1.44e+2./5.0))./pi+9.61e+2./6.25e+2).*(9.61e+2./1.0e+2)+1.0)-9.999999861537628e+9
Rv = linspace(-1E+4, 1E+4);
figure
plot(Rv,real(yfcn(Rv)))
grid
% ylim([min(ylim) 1])
figure
plot(Rv,imag(yfcn(Rv)), '-r', 'LineWidth',2)
grid
ylim([-5 max(ylim)])
There is no solution because the function never crosses 0 on either the real or imaginary axes!

Plus de réponses (0)

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by