creating an 8x8 matrix using "diag"

2 visualizzazioni (ultimi 30 giorni)
Liam Sullivan
Liam Sullivan il 22 Gen 2020
Risposto: James Tursa il 22 Gen 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.

Risposta accettata

James Tursa
James Tursa il 22 Gen 2020

Più risposte (0)

Categorie

Scopri di più su Interpolation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by