MATLAB: Making matrices with 1 and 0

matrice

Hello,
Is there a way to make this matrice or can you only type every number by yourself
-1 0
-1 0
-1 0
-1 0
-1 0
-1 0
-1 0
-1 0
-1 0
-1 0

Best Answer

You can use repmat()
x = [1 0]; % or [-1 0]
y = repmat(x, 10, 1)
Related Question