How to create a matrix?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi all, I am trying to create a matrix (101x101) like this :
Can anyone help me with the code please?
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2016년 4월 2일
편집: Azzi Abdelmalek
2016년 4월 2일
n=4 % in your case use n=101
out=tril(2*ones(n),-1)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!