Fourier Series Practise
by Matlab
Fourier series approximation of function
! -π < t < π
! n= 4
∑
∞=
−
+=
1
1
) sin 1
2 (
n
n
n nt
t
Command “for”
! Repeated calculation statements
! Description
-The general format is
for variable=expression statement
………
statement
Fourier series of square wave
• Equation
• General formula
• Conditions
- -π < t < π
- n = 45 (2n=0, 2n-1=n)
- k = 2
...) ...
7 7 sin
5 1 5 sin
3 1 3 sin
(sin 1 ) 4
( = k t + t + t + t +
t
f π
) (
1 sin ) 4
(
1
n nt t k
f
n
∑
∞=
= π
Command ‘for’
k=2
Interval t=0.01 n=45
k=2
Interval t=0.1 n=45
k=2
Interval t=0.01 N=99
k=3
Interval t=0.01 n=45