Matlab has three important functions to create matrices and set their elements to zeroes, ones, or the identity matrix. (The identity matrix has ones on the main diagonal and zeroes elsewhere.)
Z = zeros(sz,datatype,arraytype)
X = ones(sz,datatype)
I = eye(sz,datatype)
ParameterDetailsszn...