私はこのようなMATLABで異なるセルラー基地局の範囲をプロットしようとしています:MATLABでこのようなプロットを作成するにはどうすればよいですか?
しかし、私はそれを行う方法を見つけ出すことはできません。
私はこのようなMATLABで異なるセルラー基地局の範囲をプロットしようとしています:MATLABでこのようなプロットを作成するにはどうすればよいですか?
しかし、私はそれを行う方法を見つけ出すことはできません。
その周囲に円のポリゴンを作成し(半径を指定して)、このポリゴンをグリッドに変換します。次に、これらのグリッド(行列)を互いに重ね合わせます。速度のために、ポリゴンを使用する代わりに、ステーションの5行または列内のすべてのセルが値を取得するように、ステーションがカバーするセルを定義することもできます。 ステーションに入っているセルの値が1である2Dガウスフィルタをマトリックスに適用することもできます。ガウスカーネルの帯域幅は、カバレッジ半径(範囲)になります。 http://www.mathworks.ch/help/toolbox/images/ref/fspecial.html
ここでは、このようなプロットを作成する方法の例を示します。私はランダムにuniformly distributed pseudorandom numbersを使用して携帯電話基地局の位置を生成することによって、プロットのためのサンプルデータを作成することに注意してください:
%# Initializations:
minRange = 0; %# Lower x and y range
maxRange = 3.5; %# Upper x and y range
resolution = 1000; %# The number of data points on the x and y axes
cellRange = linspace(minRange, maxRange, resolution);
[x, y] = meshgrid(cellRange); %# Create grids of x and y coordinates
cellCoverage = zeros(size(x)); %# Initialize the image matrix to zero
%# Create the sample image data:
numBases = 200;
cellRadius = 0.75;
for iBase = 1:numBases
point = rand(1,2).*(maxRange - minRange) + minRange;
index = ((x - point(1)).^2 + (y - point(2)).^2) <= cellRadius^2;
cellCoverage(index) = cellCoverage(index) + 1;
end
%# Create the plot:
imagesc(cellRange, cellRange, cellCoverage); %# Scaled plot of image data
axis equal; %# Make tick marks on each axis equal
set(gca, 'XLim', [minRange maxRange], ... %# Set the x axis limit
'YLim', [minRange maxRange], ... %# Set the y axis limit
'YDir', 'normal'); %# Flip the y axis direction
xlabel('X-distance (km)'); %# Add an x axis label
ylabel('Y-distance (km)'); %# Add a y axis label
colormap(jet); %# Set the colormap
colorbar; %# Display the color bar
そしてここでは、得られたプロットです:
も注意してください内のデータということイメージ行列cellCoverage
にはノイズが含まれておらず、スムージングが適用されていないため、投稿の元の画像よりもエッジが鮮明に表示されます(のデータから生成されます。 ere)。
あなたは入力として何を持っていますか? – yuk