MATLAB: Calculate path loss

Status
Not open for further replies.

ucreate

Newbie level 3
Joined
May 13, 2016
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
26
Hello

I need some help with a simple MATLAB program.

Basically, I need to generate 100 samples of path loss that is distributed in 10km radius
where Path loss = 10+27log10(d) + 11db.

How should I generate the samples across the 10km radius?

I'm a beginner in MATLAB so I would appreciate any help.

Thanks
 

Hi,

You need to create a vector for the distance

Code:
d=1:10:10000;
Than just put it in the equation

Code:
PathLoss=10+27*log10(d)+11;
Than create a plot:

Code:
plot(d,PathLoss);
Hope it helped,
R.
 
Last edited by a moderator:

Hello,

Thanks for your reply. I believe that I have to use another formula to generate random distance points using the Radius of 10 km and I'm not sure what the formula is.
 

Uniform Random Distribution between 0km and 10km.
Code:
dmin = 0e3;
dmax = 10e3;
d = dmin + (dmax-dmin) * rand(100, 1);
 
Uniform Random Distribution between 0km and 10km.
Code:
dmin = 0e3;
dmax = 10e3;
d = dmin + (dmax-dmin) * rand(100, 1);

Thanks! I believe that's what I was looking for. By the way, what is this formula called?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…