You are on page 1of 1

QUIZ#1

(20 minutes)
1. Type the matrix A as follows

2. Remove the second column and replace it with vector [1; 1; 1]


3. Sum the 3rd and 4th columns and the result will be added after the 4th column
in matrix A.
4. Delete the 3rd row from A.
MATLAB CODE
1. A = [2 2 0 3; -1 1 2 2; 0 1 1 1]
2. A(:, 2) = []
A = [A(:, 1) [1;1;1] A(:, 2:3)]
3. B = A(:, 3) + A(:, 4)
A = [A(:, 1:4) B]
4. A(3, :)=[]

You might also like