An octave/MATLAB script to show the relation

From Class Wiki
Jump to: navigation, search

This MATLAB/octave script is a check for the idea that \int_{- \infty}^\infty e^{j2\pi ft} df = \delta(f).

close all;
T=.01;
t=-10:T:10;
f=t;
[ff,tt]=meshgrid(f,t);
r=exp(j*2*pi.*ff.*tt);
delta=trapz(r)*T;
plot(t,delta);
one1=T*trapz(delta)