%Matlab code for Fourier Series
clear all
close all
%All time values
X=linspace(-6,6,1001);
%Loop for creating the function
zz=1.2*X;
figure(1)
%Plotting the function
hold on
plot(X,zz,'linewidth',3)
xlabel('x')
ylabel('f(x)')
title('Plotting of Actual data and Fourier sum')
%fourier series
XX=linspace(-18,18,1001);
a0=0;
an=@(n) 0;
bn=@(n) ((-0.4*36)/(n*pi))*cos(n*pi);
s=a0/2;
for nn=1:20
s=s+an(nn).*cos(nn.*XX.*pi/6)+bn(nn).*sin(nn.*XX.*pi/6);
if nn==5
plot(XX,s,'linewidth',2)
elseif nn==20
plot(XX,s,'linewidth',2)
end
end
legend('Actual data','Fourier sum for 5 terms','Fourier sum for
20 terms')
grid on
%%%%%%%%%%%%%% End of Code %%%%%%%%%%%
1 point) Consider the Fourier series: nTTc a. Find the Fourier coefficients for the function f(x) 1.2 an b. Use the computer to draw the Fourier series of f(a), for x E[-18, 18], showing clearly all...
(1 point) Consider the Fourier sine series: ) 14, sin( f(z) a. Find the Fourier coefficients for the function f(x)-9, 0, TL b. Use the computer to draw the Fourier sine series of f(x), for x E-15, 151, showing clearly all points of convergence. Also, show the graphs with the partial sums of the Fourier series using n = 5 and n = 20 terms. (1 point) Consider the Fourier sine series: ) 14, sin( f(z) a. Find the Fourier...
12-21 FOURIER SERIES Find the Fourier series of the given function f(x), which is assumed to have the period 2T. Show the details of your work. Sketch or graph the partial sums up to that including cos 5x and sin 5x. 9. f(x) - 12-21 FOURIER SERIES Find the Fourier series of the given function f(x), which is assumed to have the period 2T. Show the details of your work. Sketch or graph the partial sums up to that including...
11.1 and 11.2 Fourier Series Q1 Find the Fourier series of the given function f(x), which is assumed to have the period 2π. Show the details of your work. Sketch or graph the partial sums up to that including cos 5x and sin 5x. Note: Plot the partial sum using MATLAB. Hint: Make use of your knowledge of the line equation to find f(x) from the given graph. -π 0 11.1 and 11.2 Fourier Series Q1 Find the Fourier series...
(20 points) Consider the function f(z) z in the interval [0, 2π). (a) Derive the Fourier coefficients ck fork = 0, 1,土2, (b) Derive the Fourier coefficients ao, ak, bk for k 1,2,... .. (c) Plot the partial Fourier series, along with the function f, by retaining 1, 10, 50, 100 terms in the summation (use the second form involving cosines and sines) d) Comment on the convergence of the partial Fourier series. Note: you should submit only 1 plot...
Consider the function y = x2 for x E (-7,7) . a) Show that the Fourier series of this function is n cos(nz) . b) (i) Sketch the first three partial sums on (-π, π) (ii) Sketch the function to which the series converges to on R . c) Use your Fourier series to prove that 2and1)"+1T2 12 2 2 Tu . d) Find the complex form of the Fourier series of r2. . e) Use Parseval's theorem to prove...
Consider the function -1.0xs0 0cxs2 x: 2 + 2x-x": 2: (x) = (a) Find the Fourier series of the function(x) (b) Use any graphing software to plot the function ,f(x). (c) Graph the partial sums S (x) for N 1,2,3,5,10,20,50 in ONE graph (d) Analyse your results. Consider the function -1.0xs0 0cxs2 x: 2 + 2x-x": 2: (x) = (a) Find the Fourier series of the function(x) (b) Use any graphing software to plot the function ,f(x). (c) Graph the...
Find Fourier coefficients for the following function defined on x E [-π, π] Plot the original function and the first three partial sums of the Fourier series S1, S2, S3 on the same plot. Partial sum Sn is the sum of all contributions from the frequencies less than or equal to n, i.e. Sn(x) = a0+ Σ 1 (ak cos(kx) +br sin(kx)) Find Fourier coefficients for the following function defined on x E [-π, π] Plot the original function and...
(2) Consider the function f(x)- 1 (a) Find the Fourier sine series of f (b) Find the Fourier cosine series of f. (c) Find the odd extension fodd of f. (d) Find the even extension feven of f. (e) Find the Fourier series of fod and compare it with your result -x on 0<a < 1. in (a) (f) Find the Fourier series of feven and compare it with your result in (b)
k for 2 5. Consider the function f(x) = 37T 0 for 2 Hint: See examples of functions of a generic period t; James, 4th ed. pg. 581, Ex. 7.7 & 7.8 (a) State wether it has even or odd symmetry (b) Find the Fourier series representation for f. Plot graphs of the first three partial sums SI (c) Using the result in part (b), show that 1 + 1 +.. 7 4 k for 2 5. Consider the function...
Consider the function x2 f(x) = 2 for -1 < x <n. Find the Fourier series of f. Argue that it is valid to differentiate the Fourier series term by term and compute the term by term derivative. Sketch the series obtained by term by term differentiation.