Effacer les filtres
Effacer les filtres

How do I fill an array with 1's in particular rows and columns that I want

6 vues (au cours des 30 derniers jours)
Sagar  Saxena
Sagar Saxena le 15 Juin 2018
array = zeros(100, 100)
Now, I need to make a square filled with 1's(on the boundary as well as inside), from row 20 to 80 and column 20 to 80? how should I do this ?

Réponses (1)

Walter Roberson
Walter Roberson le 15 Juin 2018
array(20:80, 20:80) = 1;

Catégories

En savoir plus sur Data Types dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by