Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MATLAB question #2 please I need exact script 2) Using the eye command, create t

ID: 3677033 • Letter: M

Question


MATLAB
question #2
please I need exact script

2) Using the eye command, create the array shown on the left below. Then using the colon to address the elements in the array, change the array to be like the one shown on the right: 10 0 0 o 0 0 01 00 0 0 0 0 0 1 0 0 0 0 A=10 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 2 2 205551 2 2 2 0 5 5 5 3 3 3 0 5 5 5 A=10 0 0 1 0 0 0 4 4 7 0 9 9 9 4 4 70 9 9 9 4 4 70 9 9 9 3) Using the zeros and ones commands, create a 3 X 5 matrix in which the first, second and fifth columns are zeros and the third and fourth columns are ones

Explanation / Answer

Question 2:

A=eye(7);
A(1:2,1:3)=2;
A(3,1:3)=3;
A(5:7,1:2)=4;
A(5:7,3)=7;
A(1:3,5:7)=5;
A(5:7,5:7)=9;
A

Question 3:

B=zeros(3,5);
B(:,3:4)=1;
B