문제

given a convolution kernel computed from sigma using the function fspecial('gaussian',,) how can I plot the frequency response in Matlab?

I would like to do this on a gaussian function, and importantly would like to derive the 1D frequency response (coz I understand them better) of the horizontal convolution kernel with size N.

Thanks for the help!!!

도움이 되었습니까?

해결책

kernel2 = fspecial('gaussian', [1 5], 1.3)
spike = [1 0 0 0 0];
[h, w] = freqz(kernel2, spike, 1024);
m = abs(h)
p = angle(h);
plot(w,m);

hat tip to https://courseware.ee.calpoly.edu/~fdepiero/curr/dsp/dsp11.htm

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top