I try to generate a gussian filter
the code is showing below. The problem was the system always said :Warning: Matrix dimensions must agree, not rendering mesh. what is this problem. Could u guys have a look please? thank you very much
%Genenrate gaussian filter
aphal=sqrt(log(2)/pi);
dx=0.1;
dy=0.1;
lamdacX=6.4;
lamdacY=6.4;
x=(-lamdacX:dx:lamdacX-dx);
y=(-lamdacY:dy:lamdacY-dy);
mx=size(x,1);
my=size(y,1);
for i=1:mx
for j=1:my
S(j,i)=(1/(aphal^2*lamdacX*lamdacY))*exp(-pi*(x(i)/aphal/lamdacX)^2-pi*(y(j)/aphal/lamdacY)^2);
end
end
S=S/sum(sum(S));
surf(x,y,S);
the code is showing below. The problem was the system always said :Warning: Matrix dimensions must agree, not rendering mesh. what is this problem. Could u guys have a look please? thank you very much
%Genenrate gaussian filter
aphal=sqrt(log(2)/pi);
dx=0.1;
dy=0.1;
lamdacX=6.4;
lamdacY=6.4;
x=(-lamdacX:dx:lamdacX-dx);
y=(-lamdacY:dy:lamdacY-dy);
mx=size(x,1);
my=size(y,1);
for i=1:mx
for j=1:my
S(j,i)=(1/(aphal^2*lamdacX*lamdacY))*exp(-pi*(x(i)/aphal/lamdacX)^2-pi*(y(j)/aphal/lamdacY)^2);
end
end
S=S/sum(sum(S));
surf(x,y,S);