How to create matrix 10x10 with same diagonal vector and empry value

12 ビュー (過去 30 日間)
Ira Wal
Ira Wal 2020 年 11 月 28 日
コメント済み: Ira Wal 2020 年 12 月 7 日
I am new to matlab and i need to create a 10x10 matrix, which consists of same number by diagonal, triangular matrix and empty values (like on image)

採用された回答

Stephen23
Stephen23 2020 年 11 月 28 日
M = toeplitz([2,1,zeros(1,8)])
M = 10×10
2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 0 0 0 0 1 2

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePartial Differential Equation Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by