Borrar filtros
Borrar filtros

Vector to Circle in Matrix

1 visualización (últimos 30 días)
martin martin
martin martin el 14 de Mzo. de 2019
Respondida: Akira Agata el 15 de Mzo. de 2019
Hello guys, I am trying to fill the matrix (zeros) of values of vector into a circle shape.
A = zeros(50)
This is sketch of my intention, any idea how to fill point in circle?

Respuesta aceptada

Akira Agata
Akira Agata el 15 de Mzo. de 2019
If you have Image Processing Toolbox, one solution would be like this:
A = zeros(50);
A(25,25) = 1;
D = bwdist(A);
idx = D <= 24;
A(idx) = 1;

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing 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