May 13, 2016 #1 U 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
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
May 14, 2016 #2 R Romansh Member level 3 Joined Apr 6, 2016 Messages 57 Helped 21 Reputation 42 Reaction score 21 Trophy points 8 Activity points 341 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: May 14, 2016
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.
May 14, 2016 #3 U ucreate Newbie level 3 Joined May 13, 2016 Messages 4 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 26 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.
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.
May 14, 2016 #4 pancho_hideboo Advanced Member level 5 Joined Oct 21, 2006 Messages 2,847 Helped 767 Reputation 1,536 Reaction score 733 Trophy points 1,393 Location Real Homeless Activity points 17,490 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);
May 14, 2016 #5 U ucreate Newbie level 3 Joined May 13, 2016 Messages 4 Helped 0 Reputation 0 Reaction score 0 Trophy points 1 Activity points 26 pancho_hideboo said: Uniform Random Distribution between 0km and 10km. Code: dmin = 0e3; dmax = 10e3; d = dmin + (dmax-dmin) * rand(100, 1); Click to expand... Thanks! I believe that's what I was looking for. By the way, what is this formula called?
pancho_hideboo said: Uniform Random Distribution between 0km and 10km. Code: dmin = 0e3; dmax = 10e3; d = dmin + (dmax-dmin) * rand(100, 1); Click to expand... Thanks! I believe that's what I was looking for. By the way, what is this formula called?
May 14, 2016 #6 pancho_hideboo Advanced Member level 5 Joined Oct 21, 2006 Messages 2,847 Helped 767 Reputation 1,536 Reaction score 733 Trophy points 1,393 Location Real Homeless Activity points 17,490 ucreate said: Thanks! I believe that's what I was looking for. By the way, what is this formula called? Click to expand... It is not a fumula. Simply it is a uniform distribution. See "help rand" at MATLAB Prompt.
ucreate said: Thanks! I believe that's what I was looking for. By the way, what is this formula called? Click to expand... It is not a fumula. Simply it is a uniform distribution. See "help rand" at MATLAB Prompt.