Borrar filtros
Borrar filtros

How to filter out annular data from square matrix

2 visualizaciones (últimos 30 días)
Bhowmik.U
Bhowmik.U el 7 de Jul. de 2018
Comentada: Bhowmik.U el 9 de Jul. de 2018
Have a square matrix...501 by 501...Z=501×501
Need to filter out an annular data 20 to 150 centered at (251,251)

Respuesta aceptada

Image Analyst
Image Analyst el 7 de Jul. de 2018
See the FAQ for creating a circle:
Then to get row and column indexes for your matrix, simply round, making sure that x is the second dimension, not the first because arrays are indexes as array(y, x) NOT array(x,y)
rows = round(y);
columns = round(x);
for k = 1 : length(rows)
Z(rows(k), columns(k)) = 0; % Filter to have whatever value you want them to have.
end
  3 comentarios
Image Analyst
Image Analyst el 8 de Jul. de 2018
Looks fine to me
Probably a rendering issue. Look at the opengl() function and try some different things.
Bhowmik.U
Bhowmik.U el 9 de Jul. de 2018
Thanks again Sir!

Iniciar sesión para comentar.

Más respuestas (1)

Bhowmik.U
Bhowmik.U el 7 de Jul. de 2018
Thanks for the suggestion..however I tried on similar lines but that yielded concentric boxes of data..rather than circles...

Categorías

Más información sobre Formatting and Annotation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by