Info
This question is locked. 編集または回答するには再度開いてください。
Help me to solve
2 ビュー (過去 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 で Introduction to Installation and Licensing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!