Matrix with gradually increasing!
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Omar
am 20 Nov. 2017
Kommentiert: Omar
am 20 Nov. 2017
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 Kommentare
Akzeptierte Antwort
John D'Errico
am 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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!