So I have this question in a homework and cannot seem to solve it no matter what I try.

Question: Use Matlab to find out what function in time x(t) resulted in the Fourier Series Coefficients Xn = j/(2*π*n) for n≠0 and X0 =0. You can accomplish this by synthesizing the signal from sufficient frequency components. Assume that the fundamental period is equal to 1. Write down the equation for the signal (a function of time) and include the plot you obtained when synthesizing the signal. Plot also the magnitude and phase spectrum

I am not sure what exactly I need for MATLAB. I already computed the Fourier transform. My guess is that I need to plot a complex spectrum plot. Here is what I have written for MATLAB so far:

dt = 0.1; tt = -10 : dt : 10; syms k xx = symsum((1j/2*pi*k)*exp(1j*2*pi.*tt), k, -10, 10);

plot(tt, abs(xx)); grid on title("Exercise 5 synthesis") xlabel("t")

All I get is no graph, and when I try using FFT, I get a data type error. I am new to MATLAB so I would appreciate an explanation of code used.

  • $\begingroup$ It can be further simplified as $ \sum_1^n (\frac{sin(2nπt)}{nπ})$ . By using trigonometry identies so it might be simpler to plot. $\endgroup$ – Ch.Siva Ram Kishore Feb 2 at 21:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.