How to create matrix with array under certain conditions?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have an array:
A=[1.3 1.2 1.3]
How can I get matrix B using A?
B=[1.3 1.3 1.3; 1.3 1.2 1.3; 1.3 1.3 1.3]
Matrix B has the value of A at the central row,column,and diagonal.
1 Commento
José-Luis
il 3 Mag 2013
You mean two diagonals? Otherwise two of the values of the resulting matrix are undefined.
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Operating on Diagonal Matrices 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!