How i can create one specific matrix 100X100?

8 ビュー (過去 30 日間)
Arhs
Arhs 2015 年 1 月 12 日
回答済み: kavya k 2017 年 5 月 16 日
The form of the matrix is
How i can create that can anyone help?

採用された回答

Star Strider
Star Strider 2015 年 1 月 12 日
編集済み: Star Strider 2015 年 1 月 12 日
This works:
v = -[1:100]';
vu = triu(repmat(v, 1, size(v,1)));
vl = tril(repmat(-v', size(v,1), 1));
out = vu + vl + diag(-v);
  2 件のコメント
Arhs
Arhs 2015 年 1 月 12 日
Ty very much, it worked like a charm!!
Star Strider
Star Strider 2015 年 1 月 12 日
My pleasure!

サインインしてコメントする。

その他の回答 (1 件)

kavya k
kavya k 2017 年 5 月 16 日
how to create a 240*320 matrix containing the data 0.1991 in all the cells.can anyone help me.

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by