Answer
In Octave GNU, a clone of MATLAB,
the following commands give the wanted results
$a. \quad$A = zeros(5,6)
$b.\quad$ B = ones(3,5)
$c.\quad$ C = eye(6)
$d.$
v=[3 5 7 2 4]
D=diag(v,5,5)
Work Step by Step
Please see screenshots: