Home > demo1 > convmtx2center.m

convmtx2center

PURPOSE ^

SYNOPSIS ^

function H = convmtx2center(h, m, n)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function H = convmtx2center(h, m, n)
0002 
0003 [mh, nh] = size(h); mh=(mh-1)/2; nh=(nh-1)/2;
0004 
0005 mm = m+2*mh; nn= n+2*nh;
0006 
0007 H = convmtx2(h, m, n);
0008 
0009 Irm = repmat(1:mm, [1,nh]);
0010 Jrm = reshape(ones(mm,1)*(1:nh),[1,mm*nh]);
0011 
0012 for ii=1:n
0013   Irm = [Irm, 1:mh, mm-mh+(1:mh)];
0014   Jrm = [Jrm, (nh+ii)*ones(1,2*mh)];
0015 end
0016 
0017 Irm = [Irm, repmat(1:mm, [1,nh])];
0018 Jrm = [Jrm, reshape(ones(mm,1)*(nn-nh+(1:nh)),[1,mm*nh])];
0019 
0020 II = setdiff(1:mm*nn, sub2ind([mm,nn],Irm,Jrm));
0021 
0022 H = H(II,:);

Generated on Sat 22-Aug-2009 22:15:36 by m2html © 2003