Clear Filters
Clear Filters

Generating Radio propagation pattern in matlab?

1 view (last 30 days)
Hello I want to implement a part of article. The following explanations are expressed in it. "we evaluate the performance of proposed localization method at varying degree of irregularity, where DOI defines the radio propagation irregularity per unit degree change in direction. The radio propagation irregularity model used in this paper is shown as follows:"
DOI=0.02;
phi = linspace(0,2*pi,360); %360 angles
r=-DOI+2*DOI*rand([1,360]); %random values between -DOI and DOI
r=cumsum(r)+1; %add them to make a path, with mean value 1
while abs(r(end)-r(1))> DOI %start and finish must not be too far away from eachother
r=-DOI+2*DOI*rand([1,360]);
r=cumsum(r)+1;
end
plot(r.*cos(phi),r.*sin(phi),'r',cos(phi),sin(phi),'--b')
axis equal
I have tried to write the code of this part but It can't get an exact result.The output must be look like the following figure with the same range and shape.

Answers (0)

Categories

Find more on WSNs in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!