How to create a matrix?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all, I am trying to create a matrix (101x101) like this :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159869/image.jpeg)
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!