0% found this document useful (0 votes)
18 views

Lab Task 8

Uploaded by

Areeb Hussain
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Lab Task 8

Uploaded by

Areeb Hussain
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

AREEB HUSSAIN LAB 08 CMS:439-2015

Task 1
1. Plot the Fourier representation of triangular wave.

(Note: n starts from 0; cos(2n+1)wt)

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

Plot the Fourier representation of full-wave rectified sine.

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

You might also like