empty sym: 0-by-1. please help me
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
인석 문
am 4 Mai 2021
Beantwortet: Star Strider
am 4 Mai 2021
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
0 Kommentare
Akzeptierte Antwort
Star Strider
am 4 Mai 2021
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
yfcn = matlabFunction(y)
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!
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Conversion Between Symbolic and Numeric finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!