Lab Task 8
Lab Task 8
Task 1
1. Plot the Fourier representation of triangular wave.
Source Code
y=0;
A=3;
f=.5;
w=2*pi*f;
t=0:.09:15;
for n=0:2:21
y=y+(1/(2*n+1)^2)*cos((2*n-1)*w*t);
end
x=((A/2)-((4*A)/(pi)^2))*y;
plot(t,x)
grid
AREEB HUSSAIN LAB 08 CMS:439-2015
Output
Task 2
Source Code
y=0;
A=3;
f=.5;
w=2*pi*f;
t=0:.09:5;
for n=0:2:21
y=y+(1/(4*(n^2)-1))*cos(n*w*t);
AREEB HUSSAIN LAB 08 CMS:439-2015
end
x=(2*A/pi)-((4*A)/(pi))*y;
plot(t,x)
grid
Output:
LEARNING OUTCOMES :
In this lab we learnt how to work by using fourier series representation of the signals