Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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

Antworten (1)

Walter Roberson
Walter Roberson am 4 Feb. 2016
  1 Kommentar
Utsav
Utsav am 12 Feb. 2016
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by