Hello. How to create such a matrix?

1 0 2 0 ..
0 2 0 3 ..
2 0 3 0 ..
0 3 0 4 ..
3 0 4 0 ..
: : : :

1 件のコメント

Stephen23
Stephen23 2018 年 12 月 10 日
@Azad Asadov: you tagged your question with "infinite matrix", which of course cannot be stored on any computer in the world.

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

 採用された回答

Image Analyst
Image Analyst 2018 年 12 月 10 日

2 投票

Another way:
c = [1 0 2 0 3];
r = [3 0 4 0];
h = hankel(c,r)
You'll see
h =
1 0 2 0
0 2 0 3
2 0 3 0
0 3 0 4
3 0 4 0

1 件のコメント

Azad Asadov
Azad Asadov 2018 年 12 月 10 日
Thank you. I need this one

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

その他の回答 (1 件)

Image Analyst
Image Analyst 2018 年 12 月 10 日

0 投票

Try this:
m = [...
1 0 2 0; ...
0 2 0 3; ...
2 0 3 0; ...
0 3 0 4; ...
3 0 4 0]

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by