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 comentarios

Niharika Arora
Niharika Arora el 14 de Mayo de 2020
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 el 14 de Mayo de 2020
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 el 19 de Mayo de 2021
Have you solve the problem? I meet the same question as yours.
Rozana
Rozana el 28 de Ag. de 2021
Editada: Rozana el 28 de Ag. de 2021
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]);
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')
.

Iniciar sesión para comentar.

Respuestas (1)

Mathieu NOE
Mathieu NOE el 19 de Mayo de 2021
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 comentarios

Rozana
Rozana el 28 de Ag. de 2021
Thanks @Mathieu NOE for your details and all the efforts!
Mathieu NOE
Mathieu NOE el 30 de Ag. de 2021
My pleasure !

Iniciar sesión para comentar.

Categorías

Más información sobre Historical Contests en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 10 de Mayo de 2020

Comentada:

el 30 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by