block diagonal matrix in the opposite diagonal
10 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
Paul
2022 年 9 月 18 日
Here's one option
a = rand(2);
b = rand(2,3);
A = blkdiag(a,b)
D = oppblkdiag(a,b)
function D = oppblkdiag(varargin)
c = cellfun(@(x) fliplr(x),varargin,'UniformOutput',false);
D = fliplr(blkdiag(c{:}));
end
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!