Info
This question is locked. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Help me to solve
조회 수: 3 (최근 30일)
이전 댓글 표시
Using the zeros, ones, and eye commands create the following arrays:
(a)
1 0 0 1 1
0 1 0 1 1
(b)
0 0 1 1
0 0 1 1
0 0 0 0
1 1 1 1
(c)
1 1 0 0 1
1 1 0 0 0
1 1 0 0 0
1 1 0 0 0
댓글 수: 0
답변 (1개)
Lokesh
2024년 10월 30일
편집: Lokesh
2024년 10월 30일
Hello Teresa,
To achieve the desired outputs, you can split each array into sub-patterns, construct them individually, and then concatenate.
For example, for output (a), you can use:
a = [eye(2), zeros(2, 1), ones(2, 2)];
Try applying a similar approach to construct the remaining outputs.
Refer to the following documentation for more information on concatenating matrices in MATLAB:
댓글 수: 0
This question is locked.
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!