- #1
impervious
- 2
- 0
Hello, I was trawling through some MATLAB work, and came across a question that bugged me, and I hope that someone might be able to give a suitable explanation.
The question was explain why the 21 point DFT has so many values equal to zero. Both DFT's are sinc functions where:
sinc(L)= sin(L * theta)/sin(L)
Heres my MATLAB code :
>> nn=0:20;
>> x=zeros(21,1);
>> x(1:7)=boxcar(7);
>> X=fft(x);
>> subplot(2,2,1),stem(nn,x);
>> subplot(2,2,2),stem(nn,abs(X));
>> subplot(2,2,3),stem(nn,angle(X));
The output of this is attached.
I understand that the basic sinc function is widely used in signals due to its zero crossings, however neither the input of the output look much like sinc functions I have seen before.
Any suggestions much appreciated.
The question was explain why the 21 point DFT has so many values equal to zero. Both DFT's are sinc functions where:
sinc(L)= sin(L * theta)/sin(L)
Heres my MATLAB code :
>> nn=0:20;
>> x=zeros(21,1);
>> x(1:7)=boxcar(7);
>> X=fft(x);
>> subplot(2,2,1),stem(nn,x);
>> subplot(2,2,2),stem(nn,abs(X));
>> subplot(2,2,3),stem(nn,angle(X));
The output of this is attached.
I understand that the basic sinc function is widely used in signals due to its zero crossings, however neither the input of the output look much like sinc functions I have seen before.
Any suggestions much appreciated.