Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top