X Y scatter data Color Contour of Frequency Distribution spatially in 125km circle

1 次查看(过去 30 天)
I have X-Y scatter data. I plotted Frequency Distribution spatially with 5km box resolution, I need values outside 125km radius to show white instead of 0. I understand NaN is the option. How do I implement NaN selectively through code
my code is
binmin = -125; binmax = 125; binwidth = 5;
xbin = 1 + floor((X(:) - binmin) / binwidth);
ybin = 1 + floor((Y(:) - binmin) / binwidth);
nbins = ceil((binmax - binmin) / binwidth);
counts = accumarray([xbin, ybin], 1, [nbins, nbins]);
figure(1)
surf(counts,'EdgeColor','none','LineStyle','none');
view(-270,-90);
any help shall be appreciated

回答(1 个)

Walter Roberson
Walter Roberson 2016-2-4
  1 个评论
Utsav
Utsav 2016-2-12
Thats okay, circlePixels will produce an array of 0 and 1. \ But I have some embedded zero within the circle of 1 too as well as outside How to selectively filter out the outside zeros.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by