请问如何在MATLAB中输入这个n维左循环矩阵,并计算结果。
A=[-1 0 1 1...0 0 0 0;
0 1 1 0...0 0 0 -1;
1 1 0 0...0 0 -1 1;
1 0 0 0...0 -1 0 1;
0 0 0 0...-1 0 1 1;
......
0 -1 0 1...0 0 0 0]

 採用された回答

0 投票

c= [-1 0 1 1 0 0 0];
T = gallery('circul',1:length(c));
indx=[T(1,:);flipud(T(2:end,:))];
c(indx)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB 快速入门 についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!