表达式是:
for i=1:n X(:,i) = [P{i}(:)]; end 其中X是DxN矩阵,P是单元数组。
回答:
如果通过mat2cell获得了单元阵列,则可能需要将图像的块排列到阵列X的列中。可以使用命令
IM2COL在一个步骤中完成此
操作
%# rearrange the large array so that each column of X %# corresponds to the 4 pixels of each 2-by-2 block X = im2col(largeArray,[2 2],'distinct');
更多&回答...