看板 MATLAB 關於我們 聯絡資訊
function outMat = blockToeplitz(blkMat, blkDim, blkNum) %Construct block-symmetric Toeplitz matrix % % Example: % % blkMat = [ones(3), 2*ones(3), 3*ones(3), 4*ones(3)]; % outMat = blockToeplitz(blkMat, 3, 4); % blkSize = blkDim^2; glbIdx = (toeplitz(1:blkNum) - 1) * blkSize; glbIdx = kron(glbIdx, ones(blkDim)); glbIdx = blockproc(glbIdx, [blkDim, blkDim], ... @(block_struct) block_struct.data + ... reshape(1:blkSize, blkDim, blkDim)); outMat = blkMat(glbIdx); - - - - 主要是使用 toeplitz function,然後再計算 index -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.160.223.55