How to create a wire of white dots
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello, I am quite clumsy in Matlab. I want to make a wire of white dots on a black surface. Something like that:
1 1 0 0 0 1 1 0 0 0 1 1; 1 1 0 0 0 1 1 0 0 0 1 1;1 1 0 0 0 1 0 0 0 1 1;
but in a matrix 2500x2500; if I use:
array=zeros(2500)
for i=1:4:2500;
for j=1:4:2500
array(i,j)=1;
end
end
then I only have one dot instead of 2; How to change it? What if I want 20 black pixels for 5 white?
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Resizing and Reshaping Matrices 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!