 # Fourier Series Questions in Matlab

## Question

Check the file: Questions.pdf

## 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);...

This is only a preview of the solution. Please use the purchase button to see the entire solution

## Related Homework Solutions

Mathematics Questions \$20.00
Mathematics
Probability
Equations
Dice Rolls
Standard Deviation
Variance
Profit
Graph
Tables
Expectation
History of Mathematics Questions \$50.00
History of Mathematics
Euclid
Apollonius
Eleatic School
Solar System
Copernicus
Least Squares Optimization \$29.00
Least Squares
Optimization Problems
Kernel
Dimensions
Matrix
Minimization
Norm
Affine Subspace
Image
Proof
Statement
Differential Equations Problems \$23.00
Mathematics
Differential Equations
Floquet Theory
Zeros
Collecting Terms
Integers
Frequencies
Expansions
Trigonometric Formulas
Lowest Order
Live Chats