Info
This question is locked. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Help me to solve
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Lokesh
am 30 Okt. 2024
Bearbeitet: Lokesh
am 30 Okt. 2024
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 Kommentare
This question is locked.
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!