How to generate matrix with any size in same pattern?

i need to generate a matrix with pattern like this. how to write a script that the required pattern
for example, if i need 10*10 matrix with the required pattern it will be like this
0 1 1 1 1 0 0 0
-1 0 0 0 0 1 1 1
-1 0 0 -1 0 -1 0 0
-1 0 1 0 -1 0 0 0
-1 0 0 1 0 0 0 -1
0 -1 1 0 0 0 1 0
0 -1 0 0 0 -1 0 1
0 -1 0 0 1 0 -1 0

1 件のコメント

Rik
Rik 2021 年 2 月 24 日
I don't see what the pattern is supposed to be. Can you explain it?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAerospace Blockset についてさらに検索

質問済み:

2021 年 2 月 24 日

コメント済み:

Rik
2021 年 2 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by