Matrix with gradually increasing!
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
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
채택된 답변
  John D'Errico
      
      
 2017년 11월 20일
        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
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

