making matrices with 1 and 0

1 visualización (últimos 30 días)
Jens Petit-jean
Jens Petit-jean el 14 de Nov. de 2020
Comentada: Jens Petit-jean el 14 de Nov. de 2020
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

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 14 de Nov. de 2020
Editada: Ameer Hamza el 14 de Nov. de 2020
You can use repmat()
x = [1 0]; % or [-1 0]
y = repmat(x, 10, 1)

Más respuestas (0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by