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:

You can help us out by revising, improving and updating this answer.
Update this answerAfter you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.