Borrar filtros
Borrar filtros

Creating a Matrix including ones on diagonal

1 visualización (últimos 30 días)
Taner Cokyasar
Taner Cokyasar el 20 de Nov. de 2016
Comentada: Taner Cokyasar el 20 de Nov. de 2016
How can I create a matrix with the most shortcut way such as:
1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
Thank you

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Nov. de 2016
kron(eye(4),ones(1,5))

Más respuestas (0)

Categorías

Más información sobre Matrices and 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