How to create a matrix?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
jack star
il 2 Apr 2016
Commentato: jack star
il 2 Apr 2016
Hi all, I am trying to create a matrix (101x101) like this :
Can anyone help me with the code please?
0 Commenti
Risposta accettata
Azzi Abdelmalek
il 2 Apr 2016
Modificato: Azzi Abdelmalek
il 2 Apr 2016
n=4 % in your case use n=101
out=tril(2*ones(n),-1)
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!