Answer :
Answer:
a = [5 8 -1 0 2 -4];
b = [4 1 9 -2 3 -5];
c = [-3 5 0 6 1 -7];
%Part i
%Creating vector D with only one command
D = [a(1:3) b(1:3) c(1:3)]
%Part ii
%Creating vector E with the last elements of a, b, and c
E = [a(4:end) b(4:end) c(4:end)]
%Part iii
%Creating matrix N with a and b as the rows
N = [a;b]
%Part iv
%Adding the variable c as the third row of matrix N
N = [N;c]
%Part v
%Creating the third row of N from -1 to -6
N(3,:) = -1:-1:-6
%Part vi
%Deleting the third column of N
N(:,3) = ''
%Part vii
%Dimensions of matrix N
S_N = size(N)
%Part viii
%Rows and columns of matrix N
Nr = S_N(1)
NC = S_N(2)
%Part ix
Ua = [N(1,1:3) N(3,3:end)]
%Part x
Uc = [N(2,2:2:end) N(2,end) N(1:3,4)']