필터 지우기
필터 지우기

Creating a Matrix including ones on diagonal

조회 수: 1 (최근 30일)
Taner Cokyasar
Taner Cokyasar 2016년 11월 20일
댓글: Taner Cokyasar 2016년 11월 20일
How can I create a matrix with the most shortcut way such as:
1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
Thank you

채택된 답변

Walter Roberson
Walter Roberson 2016년 11월 20일
kron(eye(4),ones(1,5))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by