partion of a rectangle into small rectangles with gaps
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello Everybody, I would like to wite a code that can divide a rectangle into a certain number of small rectangles( fixed number) together with gaps in between. The dimensions of the small rectangles should be between 0,6 and 9 and the same for the gaps.
2 commentaires
Geoff Hayes
le 19 Mai 2020
Juan - do all of the "small" rectangles have the same dimension? How many rows and/or columns of the smaller rectangles would there be? Can you provide an illustration of what you are looking for?
Réponse acceptée
darova
le 20 Mai 2020
Try imdilate and meshgrid
A = zeros(100);
[X,Y] = meshgrid(10:20:100);
A(X(:),Y(:)) = 1;
A1 = imdilate(A,ones(10));
imshow(A1)
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Axis Labels dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!