How to plot complicated implicit function?

조회 수: 14 (최근 30일)
Rozana Alam
Rozana Alam 2020년 5월 10일
댓글: Mathieu NOE 2021년 8월 30일
PLmax = A /1+aexp(−b[arctan(h /R)−a) + 10log(h2 + R2)+B
Where, PLmax=10 dB
a=12.0810;
b=0.1139;
B=194.2648
A =-21.4000
h,R are implicit .
@MAILAB fimplicit The graph should be like this,but with my code am not getting any output.can anyone modify it?
clc;
clear;
f1=2000E+06;
c=3*10^8;
itaNLOS=23dB;
itaLOS=1.6dB;
y=(4*pi)/c;
z=log10(f1);
B1=(20*z)+(2*log10(y))+23
A=itaLOS-itaNLOS
a=12.0810;
b=0.1139;
P=10dB;
f=@(h,R) (A/1+a*exp((-b)*((atan(h./R))-a)))+10*log10(h.^2+R.^2)+B1
fimplicit(f,[500:500:4500 500:500:4500])
  댓글 수: 5
Rozana
Rozana 2021년 8월 28일
편집: Rozana 2021년 8월 28일
Yes :)
%%%
c=3*10^8;
itaNLOS=23;
itaLOS=1.6;
B2=20*log10(f1)+20*log10(4*pi/c)+itaNLOS;
A=itaLOS-itaNLOS;
a=12.0810;
b=0.1139;
f=@(h,R)(A./(1+a.*exp((-b).*(atand(h./R))))+10.*log10(h.^2+R.^2)+B2-110);
g=fimplicit(f,[0 3000 0 3000]);
Star Strider
Star Strider 2021년 8월 28일
For anyone (else) who is wondering what the plot looks like ...
f1=2000E+06;
c=3*10^8;
itaNLOS=23;
itaLOS=1.6;
B2=20*log10(f1)+20*log10(4*pi/c)+itaNLOS;
A=itaLOS-itaNLOS;
a=12.0810;
b=0.1139;
f=@(h,R)(A./(1+a.*exp((-b).*(atand(h./R))))+10.*log10(h.^2+R.^2)+B2-110);
g=fimplicit(f,[0 3000 0 3000]);
xlabel('h')
ylabel('R')
.

댓글을 달려면 로그인하십시오.

답변 (1개)

Mathieu NOE
Mathieu NOE 2021년 5월 19일
hello
I tried a few things to understand where the problem lies. I have to say I am not an expert in this field and I will not find out if thre is a better equation but at least I found a few minor bugs here and there, and made at least the implicit function works but not with the expected P target value , neither with the expected shape . So I wonder if there is still a problem either due to the constants or how we implemented the equations (I did a few variations around the "official" one , but no one gave a satisfatory behaviour)
so to know what typical P value the equation would return for a given h,R pair, I did first a contour plot by generationg a meshgrid for h and R.
you can see that P lies in the range 100 to 130 dB , to this explains why implicit would not any solution if the P target = 10 dB, way out what is to be expected - so again, if P should be 10 dB, then we have a problem either with the constants and / or how we wrote that equation; also P was missing in the function evaluation with implicit
clc;
clearvars;
f1=2000E+06;
c=3*10^8;
itaNLOS=23; % dB;
itaLOS=1.6; % dB;
B1=20*log10(f1)+20*log10(4*pi/c)+itaNLOS;
A=itaLOS-itaNLOS;
a=12.0810;
b=0.1139;
P=10; % dB;
%% first plot using meshgrid
x = 50:50:4500;
y = 50:50:4500;
[h,R] = meshgrid(x,y);
f = A./(1+a*exp(-b*(atan(h./R)-a)))+10*log10(h.^2+R.^2)+B1;
figure(1),contour(x,y,f,10);colorbar('vert');
colormap(jet)
set(gca,'YDir','normal')
% return
%%%%%%%%%
% P=10; % dB;
P=125; % dB;
f=@(h,R) A./(1+a*exp(-b*(atan(h./R)-a)))+10*log10(h.^2+R.^2)+B1 - P
fimplicit(f,[500 4500 500 4500])
  댓글 수: 2
Rozana
Rozana 2021년 8월 28일
Thanks @Mathieu NOE for your details and all the efforts!
Mathieu NOE
Mathieu NOE 2021년 8월 30일
My pleasure !

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Historical Contests에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by