3.1 DSP notes

For fourier transform in mathematica, use these options

From Wikipedia. Discrete convolution

Autocorrelaton

Mathematica notebook

Matlab code

function nma_show_fourier 
 
t=-4:.1:4; 
N=4; 
T=2; 
plot(t,y(t,-N,N,T)); 
 
 
end 
 
%------------------ 
function v=c(k,T) 
term=pi*k/2; 
v=(1/T)*sin(term)/term; 
end 
 
%--------------------- 
function v=y(t,from,to,T) 
 
coeff=zeros(to-from+1,1); 
k=0; 
for i=from:to 
    k=k+1; 
    coeff(k)=c(i,T); 
end 
 
v=zeros(length(t),1); 
for i=1:length(t) 
    v(i)=0; 
    for k=from:to 
        v(i)=v(i)+coeff(k)*exp(sqrt(-1)*2*pi/T*k*t(i)); 
    end 
end 
end

l.30 — TeX4ht warning — \SaveEverypar’s: 2 at \begindocument and 3 \enddocument —