Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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

Respuestas (1)

Walter Roberson
Walter Roberson el 4 de Feb. de 2016
  1 comentario
Utsav
Utsav el 12 de Feb. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Scatter Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by