Question: I ' m to plot the following signal using matlab using Fourier Series. The frequency is 2 0 kHz . Below are the manual calculation

I'm to plot the following signal using matlab using Fourier Series. The frequency is 20 kHz. Below are the manual calculation for the trigonometric Fourier series done by myself. Below are my Matlab codings. Is my manual calculation have mistake/wrong? Or my coding is wrong? Why the matlab gives a graph that is not same with the first picture? How can I get the frequency domain from my manual calculation of x(t)? Thank you! I would upvote if you give good answer, and vice-versa.
My Matlab Codings:
t =-5:0.01:5;
figure;
Final_x_t = zeros(size(t));
for n =1:50;
Individual_term_of_x_t =(2/(((2* n +1)* pi)))* sin ((2* n +1)* t *40000* pi );
Final_x_t = Final_x_t + Individual_term_of_x_t;
end %end the for loop
Final_Final_x_t =(1/2)+ Final_x_t
subplot(4,1,1)
plot(t, real(Final_Final_x_t));
title('x(t) for n =0 to 5');
xlabel('Time (s)');
ylabel('Amplitude');
grid on;
I ' m to plot the following signal using matlab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!