How to plot complicated implicit function?

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 件のコメント

Niharika Arora
Niharika Arora 2020 年 5 月 14 日
The information in the question doesn't seem to be adequate. Could you please provide the following information:
  1. Could you clear what's the significance of the declaration of 'f' in the first line?
  2. atan() requires the argument to be in radians. Can you make sure that is the case here?
  3. What do you mean by PLmax=10, in the first line?
  4. Can you share what does this equation refer to?
Rozana Alam
Rozana Alam 2020 年 5 月 14 日
Thank you so much @Niharika Arora for your reply.
  1. i have modified the mistake of declaring f previously.
  2. here h and R are indicating height and radius, which is a integer value.
  3. PLMAX is maximum pathloss value in dB.
  4. sure, this code is referring to a air to ground wireless channel model where h,R are both implicit.
vidawung
vidawung 2021 年 5 月 19 日
Have you solve the problem? I meet the same question as yours.
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 日

1 投票

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 !

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeHistorical Contests についてさらに検索

質問済み:

2020 年 5 月 10 日

コメント済み:

2021 年 8 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by