필터 지우기
필터 지우기

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

조회 수: 6 (최근 30일)
Sagar  Saxena
Sagar Saxena 2018년 6월 15일
답변: Walter Roberson 2018년 6월 15일
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 ?

답변 (1개)

Walter Roberson
Walter Roberson 2018년 6월 15일
array(20:80, 20:80) = 1;

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by