How to generate a signal using exponential forier series?

2 views (last 30 days)
Arrian Esteki on 4 Dec 2021
Answered: Star Strider on 4 Dec 2021 Star Strider on 4 Dec 2021
I have no idea what the Question actually is, however generating a Fourier series from disconnected lines is straightforward, if a bit tedious.
Here’s an example —
syms t omega
sympref('AbbreviateOutput',false);
y(t) = piecewise(((t>=-2) & (t<-1)),2+t, ((t>=-1) & (t<0)),-t, ((t>=0) & (t<1)),t, ((t>=1) & (t<2)),2-t )
y(t) = figure
fplot(y, [-3 3])
grid
xlabel('t')
ylabel('y(t)')
title('Periodic Triangle Pulses')
ylim([0 1.5]) krnl(omega,t) = exp(-1j*omega*t)
krnl(omega, t) = ft = int(krnl*(t+2), t, -2, -1) + int(krnl*(-t), t, -1, 0) + int(krnl*(t), t, 0, 1) + int(krnl*(2-t), t, 1, 2)
ft(omega) = ft = simplify(ft, 500)
ft(omega) = figure
fplot(ft, [-10*pi 10*pi])
grid
xlabel('\omega')
ylabel('Amplitude')
title('Fourier Transform Of Periodic Triangle Pulses')
ylim([-1.5 2.5]) figure
fplot(20*log10(abs(ft)), [-10*pi 10*pi])
grid
xlabel('\omega')
ylabel('Amplitude (dB)')
title('Fourier Transform Of Periodic Triangle Pulses')
ylim([-110 10]) .

William Rose on 4 Dec 2021
Please explain your question in more detail. Write a few sentences describing the problem exactly. Also, show what Matlab code you have tried so far. This looks like a homework problem. This is not a homework site. If you have a specific problem, such as ifft() is not doing what you want, then people at this site will be sure to give you good help.