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.