 # Fourier Series Questions in Matlab

## Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

function solutions()
clear all
close all
disp('--------------Problem 1-----------------')
problem1=true;
if (problem1)
N=100;T=2;
t=linspace(-3*T/2,3*T/2,3*N);
plot(t,[-1/2+(t(1:N)+T).^2,-1/2+t(N+1:2*N).^2,-1/2+(t(2*N+1:3*N)-T).^2],'b');
xlabel('t')
ylabel('y=f(t)')
hold on
coeff_for_pi4=rat(7/60/8-1/36/8)
syms x
c(1)=1/2*int(x^2-1/2,x,-1,1);
c(2)=1/2*int(exp(-i*pi*x)*(x^2-1/2),x,-1,1);
c(3)=1/2*int(exp(-i*2*pi*x)*(x^2-1/2),x,-1,1);
Nmin=ceil((5/100*7/60*3*pi^4/8)^(-1/3))
S2=c(1)+2*c(2)*cos(pi*t)+2*c(3)*cos(2*pi*t);
plot(t,S2,'r')
legend('function f','Fourier approximation with 2 terms')
hold off
error=x^2-1/2-(c(1)+2*c(2)*cos(pi*x)+2*c(3)*cos(2*pi*x));
errorenergy=int(error^2,x,-1,1);...
\$88.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.