Vector to Circle in Matrix
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
martin martin
am 14 Mär. 2019
Beantwortet: Akira Agata
am 15 Mär. 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?

0 Kommentare
Akzeptierte Antwort
Akira Agata
am 15 Mär. 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;
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!