function cm = parcoe2(Kx,Ky)
% cm = parcoe2(Kx,Ky)
cm = zeros(5,5);
kx = (Kx-1)/2;
ky = (Ky-1)/2;

c11 = 0; c12 = 0; c13 = 0; c14 = 0; c15 = 0;
         c22 = 0; c23 = 0; c24 = 0; c25 = 0;
                           c34 = 0; c35 = 0;
				                    c45 = 0;
for y = -ky:ky
  for x = -kx:kx
    x2 = x*x; x3 = x*x2; x4 = x2*x2; 
    y2 = y*y; y3 = y*y2; y4 = y2*y2;
    c11 = c11 + x4;
    c12 = c12 + x2*y2;
    c13 = c13 + x3;
    c14 = c14 + x2*y;
    c15 = c15 + x2;
    c22 = c22 + y4;
    c23 = c23 + x*y2;
    c24 = c24 + y3;
    c25 = c25 + y2;
    c34 = c34 + x*y;
    c35 = c35 + x;
    c45 = c45 + y;
  end
end
cm(1,1) = c11; cm(1,2) = c12; cm(1,3) = c13; cm(1,4) = c14; cm(1,5) = c15;
cm(2,1) = c12; cm(2,2) = c22; cm(2,3) = c23; cm(2,4) = c24; cm(2,5) = c25;
cm(3,1) = c13; cm(3,2) = c23; cm(3,3) = c15; cm(3,4) = c34; cm(3,5) = c35;
cm(4,1) = c14; cm(4,2) = c24; cm(4,3) = c34; cm(4,4) = c25; cm(4,5) = c45;
cm(5,1) = c15; cm(5,2) = c25; cm(5,3) = c35; cm(5,4) = c45; cm(5,5) = Kx*Ky;
