Question

2.10-3 Using direct integration, numerically derive and plot the exponential Fourier series coefficients of the following per

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB code is given below in bold letters.

clc;
close all;
clear all;

% define the signal parameters
Vm = 13;
T = 4;
w0 = 2*pi/T;

% define the symbolic variables
syms n t;

% define the signal over one period
v1 = t^3;

% evaluate the fourier series integral
c = 1/T*int(v1*exp(-1j*n*w0*t),-T/2,T/2);
c0 = 1/T*int(v1,-T/2,T/2);

% obtain C by substituting n in c[n]
nmax = 100;
n = -nmax:nmax;
c = subs(c);
c0 = subs(c0);
c(nmax+1) = c0;

% plot the fourier coefficients
figure;
stem(n,abs(c));grid on;xlabel('n');ylabel('Amplitude');
title('fourier series coefficients of g(t): G[n]');

% fft method
% define the signal first over one period
t = -2:0.01:2;
g = t.^3;

% find fft of g(t)
G = fftshift(fft(g))/length(g);
% plot fft
figure;plot(abs(G));grid on; xlabel('frequency bins');title('fft of g(t)');

Plots are given below:

fourier series coefficients of g( G[n] 1.2 0.6 0.4 0.2 00 80 0 40-20 0 20 460 80 100ft of g(t) 1.4 1.2 0.8 0.6 0.4 0.2 0 50 100 150 200 250300 350 400 450 frequency bins


Add a comment
Know the answer?
Add Answer to:
2.10-3 Using direct integration, numerically derive and plot the exponential Fourier series coefficients of the followi...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT