freq_diffusion.m

function r=freq_diffusion(p,l,t)

#freq_diffusion(gaussian1d(100,50,5),0.5,100);

n=length(p);
q0=fft(p);
Q=q0;

g=[1-l,l/2,zeros(1,n-3),l/2]';
G=fft(g);

#[X,T]=meshdom(1:n,1:t);

for n=1:(t-1)
  q=q0.*(G.^n);
#  Q=[q,Q];
  plot(1:length(q),sqrt(real(q).^2+imag(q).^2));
end

#mesh(T,X,norm(Q'));

r=ifft(q);

댓글

이 블로그의 인기 게시물

Draw Circle on PictureBox when Button Click - Winform

2D FFT of Gray Image by AForge