Consider a periodic square wave with a fundamental period of 𝑇=4. Over the interval โ2< 𝑡 <2, the square
Posted: Tue Apr 26, 2022 3:23 pm
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?
๐=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?