如何在MATLAB中计算n维左循环矩阵的值?

请问如何在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 Exchange 中查找有关 MATLAB 快速入门 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!