Escolar Documentos
Profissional Documentos
Cultura Documentos
x ( n ) is non-zero over the range 0 n 4. Lets create this signal in Matlab, and
corresponds to n = 0. We can
>> G = fft(x);
>> w = linspace(0,2*pi,len);
>> stem(w,G);
As is expected, this results in a more coarsely-sampled version of X(ej).
3 Discrete-time Fourier Transform Properties
In this section, we will look at two of the Fourier transform properties. We will use signal x(n)
from the previous section. Recall the Matlab code to create this signal and calculate its spectrum:
>> len = 100;
>> n = 0:1:len-1;
>> w = linspace(0,2*pi,len);
>> x = zeros(1,len);
>> x([0:1:4]+1) = 1;
>> G = fft(x);
3.1 Time shifting
In this section we consider the time shift property discussed in class. Lets create a new signal
shifted by n0 = 10:
>> y = [zeros(1,10) x(1,90)];
Now, we can calculate both the response of this signal (H):
>> H = fft(y);
Finally, we can plot frequency response:
>> figure(1);
>> stem(w,H);
We observe that the time-shifting property holds.
3.2 Frequency Shifting
In this section we consider the frequency shift property. First we multiply x(n) by a complex
exponential with o = /3:
y = exp(-j*pi/3*n).*x;
H = fft(y);
Now, we can plot both the original and new frequency responses:
>> figure(1);
>> stem(w,G);
>> figure(2);
>> stem(w,H);
You should observe from these plots that the frequency spectrum of y(n) is indeed shifted by an
amount o = /3.