Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Fourier Series for a triangular \"sawtooth\" wave at t = 0 s is given by y(x

ID: 2080539 • Letter: T

Question

The Fourier Series for a triangular "sawtooth" wave at t = 0 s is given by y(x, 0) = - 1/pi sin(kx) - 1/2pi sin(2kx) - 1/3 pi sin(3kx) - 1/4 pi sin(4kx) - ... Use MATLAB or write a computer program in some other language to plot the contribution of each of the first 8 terms to y(x, 0) and their sum. That is, your graph should show each term and the sum of each term all on one clear, labeled, easy to read plot. Also make sure the equation you plotted is shown somewhere on the graph-in the form you entered it. (Or just print out the code used to generate the plot and attach it.)

Explanation / Answer

y=0;
y_int = zeros(8, 2001);
x = 0:0.01:20;
%colormap = ['g', '']

for n=1:1:8
y = y+(-(1/(n*3.14))*sin(n*x));
y_int(n, 1:2001) = -(1/(n*3.14))*sin(n*x);
plot(y_int(n, 1:2001), 'color', rand(1,3));
hold on;
end
plot(y);
hold on;
h = legend('-(1/(1*3.14))*sin(1*x)','-(1/(2*3.14))*sin(2*x)','-(1/(3*3.14))*sin(3*x)','-(1/(4*3.14))*sin(4*x)','-(1/(5*3.14))*sin(5*x)','-(1/(6*3.14))*sin(6*x)','-(1/(7*3.14))*sin(7*x)','-(1/(8*3.14))*sin(8*x)','sawtooth');%plot(y_int(1, 1:2001), 'g');
set(h, 'Interpreter', 'none');

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote