blob: 9762935e9e5aaaec079a8660e047a334d413da49 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//example 3_11
//exponential fourier Series coefficient and corresponding spectra
clc;
clear;
close;
//Assume period of the impulse train T=2
T=2;
t=-5*T:T:5*T;
for i=1:length(t)
x(i)=1;
end
//Using shifting property of the impulse signal//
k=-10:10
for i=1:length(k)
ak(i)=1/T;
end
subplot(2,1,1)
plot(t,x,'.')
xtitle("Impulse train","t","x(t)")
subplot(2,1,2)
plot(k,ak,'.')
xtitle("Fourier coefficients of impulse train","k","ak")
|