Hi!
Thank you for the help, but i just don't get why my ouput should be
right.
When I compare it with the multiplication in the frequency domain +fft on that
(e. g. the normal way you do filter design, it just looks completely different).
Moreover, if i take the angle() of my frequency domain convolution result, it
doesn't look like it has linear phase, which it should have.
Here my code once again didn't find the other post:
N24; %number of fft samples
f1=-1:2/(N-1):1; %for the index of the plots
L=floor(N*0.25); %get a cutoff frequency this way??
MQ;
window=rectwin(M);
x1tshift((fft(window,N))')/sum(window);%fft the window, normalise and
shift
the window
x2=[zeros(1,N/2-L/2) ones(1,L) zeros(1,N/2-L/2)]; %frequency response of a
ideal
low pass
convonv(x1,x2,N); %do the circular convolution
plot(handles.conv_demo_axes,f1,x1,'k',f1,x2,'r'); %plot the
window and the ideal
low pass in the frequency domain
plot(handles.convolution_axes,f1,20*log10(abs(convo)));%log plot of the
filter
when i plot
abs(fft(x1.*x2,N) it looks a lot more like a filter response than the above
answer. Shouldn't/Mustn't it look similar?
I'm afraid there is some trivial misunderstanding or error i just
don't get...
Thanks for any help,
Mark
Hello Mark,
>�
>The output seems to be okay. I don't see any problem with it. May be you
should remove the db conversion part and see the output.
>�
>plot(handles. convolution_ axes,f1, 20*log10(abs( convo))); %log plot of the
filter
>
>Also, the confusion could be because of the x-axis being viewed from 0 to Fs (0
to N) and not from -Fs/2 to Fs/2 (-N/2 to N/2).
>�
>Hope this helps.
>�
>Regards,
>Rajmathi S.
>
>