wo=pi;
i=randi(10);
j=randi(10);

j=i;
a=rand(1,10000)*2-1;

[x,y]=meshgrid(-1:1/1000:1);
F1=sin(wo*i*x).*cos(wo*i*y);

F2=cos(wo*j*x).*sin(wo*j*y);

P=sum(sum(F1.*F2));

fprintf('\n i= %d & j=%d  ==>  %d', i,j,P);