MATLAB Language Initializing Matrices or arrays Creating a matrix of 0s


Example

z1 = zeros(5); % Create a 5-by-5 matrix of zeroes
z2 = zeros(2,3); % Create a 2-by-3 matrix