Matrix with gradually increasing!
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi everyone! Can somebody help me to write a code to return a matrix with the following form: [1 1 1 1 1;1 1 1 1 0;1 1 1 0 0;1 1 0 0 0;1 0 0 0 0]? it's 5x5 square matrix Thanks in advance
0 Commenti
Risposta accettata
John D'Errico
il 20 Nov 2017
flip(tril(ones(5)))
ans =
1 1 1 1 1
1 1 1 1 0
1 1 1 0 0
1 1 0 0 0
1 0 0 0 0
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical 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!