%Matlab code for Fourier Series
clear all
close all
%All time values
t=linspace(-pi,pi,1001);
%function value
zz=1./(1+t.^2);
figure(1)
%Plotting the function
plot(t,zz,'Linewidth',2)
xlabel('t')
ylabel('f(t)')
title('Plotting of Actual data and Fourier sum')
a1=t(1); b1=t(end);
l=(b1-a1)/2;
%Fourier series of the function for finding a and b
coefficients
for j=1:50
ss1=zz.*cos(j*pi*t/l);
%all a values of the Fourier series
aa(j)=(1/l)*trapz(t,ss1);
ss2=zz.*sin(j*pi*t/l);
%all b values of the Fourier series
bb(j)=(1/l)*trapz(t,ss2);
end
%a0 value of Fourier series
aa0=(1/l)*trapz(t,zz);
t=linspace(-3.*pi,3.*pi,6001);
s=aa0/2;
fprintf('Yes this function is continuous and
differentiable.\n\n')
%all an and bn terms
fprintf('Printing few terms for Fourier series\n')
for i=1:10
fprintf('\tThe value of a%d=%f and b%d=%f.
\n\n',i,aa(i),i,bb(i))
end
lgnd{1}='Actual plot';
%Fourier series of the function
hold on
for i=1:50
s=s+bb(i)*sin(i*pi*t/l)+aa(i)*cos(i*pi*t/l);
if i==3
plot(t,s)
lgnd{2}=sprintf('Fourier
sum for %d terms',i);
elseif i==5
plot(t,s)
lgnd{3}=sprintf('Fourier
sum for %d terms',i);
elseif i==7
plot(t,s)
lgnd{4}=sprintf('Fourier
sum for %d terms',i);
elseif i==20
plot(t,s)
lgnd{5}=sprintf('Fourier
sum for %d terms',i);
elseif i==50
plot(t,s)
lgnd{6}=sprintf('Fourier
sum for %d terms',i);
end
end
legend(lgnd,'Location','northwest')
figure(2)
plot(aa)
xlabel('count')
ylabel('a_k amplitude')
title('a_k plot')
%%%%%%%%%%%%%%%%%% End of Code %%%%%%%%%%%%%%%%%
Exercise 5. Let f(t) denote the 2-periodic function f(t) = 1+2 - <t< . a) Make...
Exercise 1. Let 0<a<7. Let f(t) denote the 27t-periodic function 10, if a<\t]<1. a) Make a representative plot of f(t) showing at least 3 periods for a = 7/8, 7/2, and 7/8. b) Compute explicitly the Fourier series coefficients as of f(t). c) Make a representative plot of the absolute values of the Fourier coefficients, lax for a= /8, 7/2, and 7/8. The plot must at least show (0-20) through a 2013 d) By looking at the plots in parts...
Suppose, we let g(t) of problem 1 be periodic (i.e., g(t) is 9T (t) according to the notation using). To be precise let A 4Volts, let the pulse width T-0.1 seconds and let the 0.2 seconds. Find its continuous Fourier transform. Hint: gr. (t) is now that we are fundamental period To periodic and hence you can first find the Fourier series coefficients (C,) and relate those coefficients to the continuous Fourier transform of a periodic signal. Accurately sketch the...
Let f(t) be periodic function with period T = 1 defined over 1 period as f(t) = {t -1/2 < t < 1/2} (a) Plot f(t) and find its Fourier series representation. (b) Find the first four terms of the fourier series.
11. (10 points) Let f(t) be a 27-periodic function defined by f(t) = -{ 2 if – <t<0, -2 if 0 <t<, f(t + 2) = f(t). a) Find the Fourier series of f(t). b) What is the sum of the Fourier series of f at t = /2.
-Let-f(t)= 10 +:īncos nuot ot Could f(t) be the Fourier series representation of the periodic function shown below? Use qualitative reasoning only, i.e., do not attempt to find the Fourier series coefficients in answering this question. Justify your answer
Thanks for answering in advance.
a, b Let f(x) be the |b al- 2. Let f(x be a continuous function defined on periodic extension of f. Find the Fourier coefficients of f in terms of integrals of f
a, b Let f(x) be the |b al- 2. Let f(x be a continuous function defined on periodic extension of f. Find the Fourier coefficients of f in terms of integrals of f
5. Let f a, b R be a 4 times continuously differentiable function. For n even, consider < tn = b, a to < t< an uniform partition of [a, b] with b- a , i = 0,1,.. , n - 1 h t Let T denote the composite Trapezoidal rule associated with the above partition which approx imates eliminate the term containing h2 in the asymptotic expansion. Interprete the result which you obtain as an appropriate numerical quadrature rule...
Q2. The following function f(t) is periodic with fundamental period To Sketch f(t) for at least 2 full cycles and obtain an expression for the Fourier series. Ensure that you calculate all coefficients and check your answer with the knowledge of odd or even functions. (0 – T. /251<-To 14, f(t) = {2A, - T./451< +T./4, 0, +T, / 4<t<+T72.
Let x(t) denote a signal and X(f) denote the corresponding Fourier transform which is given in the graph below. Given this graph, sketch the Fourier transforms of the following signals: -2 2 a, x b.x) Cos(8m) c. x(t) sinc (t) 2/
Let x(t) denote a signal and X(f) denote the corresponding Fourier transform which is given in the graph below. Given this graph, sketch the Fourier transforms of the following signals: -2 2 a, x b.x) Cos(8m) c. x(t) sinc...
Let f(t) be a 2L- periodic wave function with one period on -pi<= t <= pi defined as f(t) = 1 if |t| <= T and 0 if T < |t| <= pi Find the real fourier series of f(x) first and then convert to complex form