%this file tests the capability of the DFT
%the matlab function fft is used to get the Fourier transform
To=10;  %this is the observation time
No=100;     %number of samples within the observation time
T=To/No;    %this is the sampling time
Omegao=(2*pi)/To; %the frequency step
Data=zeros(No,1);  %this is the vector of data
for k=1:No
  Current_Time=(k-1)*T;
  %Data(k,1)=T*sin(10^4*pi*Current_Time);
  %Data(k,1)=T*exp(-3*Current_Time);
  %Data(k,1)=T*1.0;
  if(k<=50)
      Data(k,1)=T*1.0
  else
      Data(k,1)=T*0;
  end
end
DFT=fft(Data);  %get the DFT
plot(abs(DFT)); %plot its absolute value
