Frage

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!!!

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top