How to create a matrix?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
jack star
am 2 Apr. 2016
Kommentiert: jack star
am 2 Apr. 2016
Hi all, I am trying to create a matrix (101x101) like this :
Can anyone help me with the code please?
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 2 Apr. 2016
Bearbeitet: Azzi Abdelmalek
am 2 Apr. 2016
n=4 % in your case use n=101
out=tril(2*ones(n),-1)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!