Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gauss = zeros(10,10);
- sigma = 3;
- for x=1:10
- for y=1:10
- gauss(x,y) = exp(-((x-6)*(x-6)+(y-6)*(y-6))/(2*sigma));
- end
- end
- somagauss = sum(gauss);
- gauss = gauss/somagauss;
- // surf(gauss);
- gs=fftshift(gauss)
- gf=fft2(gs)
- m1=[0 0 0 0 0 0 0 0 0 0;
- 0 0 0 0 0 0 0 0 0 0;
- 0 1 1 1 1 1 1 1 0 0;
- 0 1 1 1 1 1 1 1 0 0;
- 0 1 1 0 0 0 1 1 0 0;
- 0 1 1 0 0 0 1 1 0 0;
- 0 1 1 1 1 1 1 1 0 0;
- 0 1 1 1 1 0 0 0 0 0;
- 0 1 1 1 1 0 0 0 0 0;
- 0 1 1 1 1 0 0 0 0 0];
- m1f=fft2(m1)
- multi=gf.*m1f
- mfinal=mfft(multi,1,[10;10])
- mreal = real(mfinal)
Add Comment
Please, Sign In to add comment