Question

2.7-1 (a) Sketch the signal g(t) = 12 and find the exponential Fourier series to represent 8(1) over the interval (-1, 1). Sk solve it using matlab
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB:

clc;
clear all;
close all;

%Define g(t)
tt=-1:0.001:1;T=3
gg=(tt.^2).*(tt>=-1&tt<=1)
t=linspace(-T,T,3*length(tt))
g=[gg gg gg];
subplot(211)
plot(t,g,'linewidth',3,'b');grid;xlabel('t');
ylabel('g(t)');title('g(t)=t^2');

%Exponential fourier series
T0=2;w0=2*pi/T0;N=5;
k=0;
for n=-N:1:N
k=k+1;
c(k)=(trapz(tt,gg.*exp(-j*n*w0*tt)));
end
c=c/T0

%To plot fourier series of g(t)
k=0;n=-N:1:N
for t=t
k=k+1;
gN(k)=sum(c.*(exp(j*n*w0*t)));
end
t=linspace(-T,T,3*length(tt))
subplot(212)
plot(t,gN,'m','linewidth',3)
title('Fourier series approximation of g(t)')
xlabel('t')
ylabel('gN(t)')
grid on;

Plot:

g(t)=42 (1)6 2 Fourier series approximation of g(t) gN(t)

Please give positive rating if you understood the answer thank you..please it's important to me

Add a comment
Know the answer?
Add Answer to:
solve it using matlab 2.7-1 (a) Sketch the signal g(t) = 12 and find the exponential...
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