Page 1 of 1

Consider a periodic square wave with a fundamental period of &#119879;=4. Over the interval โˆ’2< &#119905; <2, the square

Posted: Tue Apr 26, 2022 3:23 pm
by answerhappygod
Consider a periodic square wave with a fundamental period of
๐‘‡=4. Over the interval โˆ’2<
๐‘ก <2, the square wave is described by:
๐‘ฅ5(๐‘ก)={3, |๐‘ก|โ‰ค0.5
0, |๐‘ก|>0.5
a) [2 pts] what do you expect the Fourier
series coefficients to be?

b) [3 pts] Create a symbolic expression for ๐‘ฅ5(๐‘ก) and then input
that to the int function to
create a symbolic expression for the Fourier series
coefficients.
(Note: You will need to define two symbolic variables for
this.)

c) [5 pts] Use the subs function and your expression from part b)
to determine the Fourier
series coefficients for โˆ’100โ‰ค๐‘˜ โ‰ค100. Plot the resulting Fourier
series coefficients
from -20 to 20 using the stem function. (xlim may be useful
here)
(Note: You will need to calculate the ๐‘˜ =0 term separately to avoid
a division by zero
error for this particular function.)

d) [5 pts] Create symbolic expressions of ๐‘ฅ๐‘(๐‘ก) for ๐‘=1,3,9,๐‘Ž๐‘›๐‘‘
100, and use fplot
to plot each of the functions on the same plot with ๐‘ฅ5(๐‘ก) for
โˆ’2โ‰ค๐‘กโ‰ค2.
(Hint: The symsum function can be helpful here. Also, the hold
function will be needed
to put all the plots on the same figure.)

e) [1 pts] What are the values of ๐‘ฅ๐‘(๐‘ก) for ๐‘ =1,3,9,๐‘Ž๐‘›๐‘‘ 100 at ๐‘ก
=ยฑ0.5? Does this
make sense?