📄 blkm2vc.m
字号:
function vc = blkM2vc(M, blkS)%blkM2vc Reshaping of a block-matrix into a matrix of vectors%% The matrix M consists of blocks of size blkS = [r c]% Each r by c block of the matrix M is converted into% a rc by 1 vector and placed as a column of the matrix vc[rr cc] = size(M) ;r = blkS(1) ; c = blkS(2) ;if (rem(rr, r) ~= 0) | (rem(cc, c) ~= 0) error('blocks do not fit into matrix')endnr = rr/r ; nc = cc/c ; rc = r*c ;vc = zeros(rc, nr*nc);for ii = 0:nr-1 vc(:, (1:nc)+ii*nc) = reshape(M((1:r)+ii*r, :), rc, nc) ;end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -