creating an 8x8 matrix using "diag"

2 visualizaciones (últimos 30 días)
Liam Sullivan
Liam Sullivan el 22 de En. de 2020
Respondida: James Tursa el 22 de En. de 2020
So im trying to create an 8x8 matrix with 2's in the diagonal but 0s everywhere else. I used diag(8,8)*0 + 2 but that gived me 2's everywhere.

Respuesta aceptada

James Tursa
James Tursa el 22 de En. de 2020

Más respuestas (0)

Categorías

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