You are on page 1of 6

%serie de Fourier

clc
clear all
close all
syms t n
%intervalos de integraciòn
D=[4 4.5 5.5 6]; %D(1)=4 D(2)=4.5 D(3)=4.5 D(4)=6
%SEÑAL PERIODICA
f=[4*t-16 -4*t+20 4*t-24]; %f1(1)=4*t-16 f2(2)=-4*t+20 f3(3)=4*t-24
f=sym(f);
%periodo
T=max(D)-min(D);
%frecuencia agular
w=2*pi/T;
%coeficiente a0
a0=0;
for i=1:length (f)
a0=a0+int(f(i),'t', D(i), D(i+1));
end
a0=a0/T;

>> a0

a0 =

0

Int =integral Intervalo de integración An=integra pero se agrega coseno .

(4*cos((11*pi*n)/2))/(pi^2*n^2) - (2*sin((9*pi*n)/2))/(pi*n) .(2*sin((11*pi*n)/2))/(pi*n) + (2*(2*cos((9*pi*n)/2) - 2*cos(4*pi*n) + pi*n*sin((9*pi*n)/2)))/(pi^2*n^2) + (2*(2*cos(6*pi*n) - 2*cos((11*pi*n)/2) + pi*n*sin((11*pi*n)/2)))/(pi^2*n^2) Cambiar o simplificar Sen(9 π n)=0 Sen(11 π n)=0 Simplificando usando la función simple an =(4*cos(6*pi*n) .an = (4*cos((9*pi*n)/2))/(pi^2*n^2) .8*cos((11*pi*n)/2))/ (pi^2*n^2) cos (6 π n)=1 cos (4 π n)=1 .4*cos(4*pi*n) + 8*cos((9*pi*n)/2) .

simplificación en cadena an =(8*cos((9*pi*n)/2) .4*sin(4*pi*n) + 8*sin((9*pi*n)/2) - 8*sin((11*pi*n)/2))/(pi^2*n^2) bn = (8*sin((9*pi*n)/2) .8*cos((11*pi*n)/2))/(pi^2*n^2) bn bn bn = (4*sin(6*pi*n) .8*sin((11*pi*n)/2))/(pi^2*n^2) .

0000 0.1801 0.0e-14 * 0.0259 0 bn = 1.0331 0.0000 -0.2433 0 -0.0000 -0. >> n n= 1 2 3 4 5 6 7 8 >> an an = 1.0971 0 0.6211 -0.0000 .0429 0 -0.0648 -0.

for i=1:8.8*sin((11*pi*n)/2))/(pi^2*n^2). %serie de fourier f=0. for i=1:8. %valores de an y bn clc clear all close all T=2. f=f+an*cos(n*w*t)+bn*sin(n*w*t). syms t a0=0. an =(8*cos((9*pi*n)/2) . f=f+an*cos(n*w*t)+bn*sin(n*w*t).8*sin((11*pi*n)/2))/(pi^2*n^2). end f=f+a0. %serie de fourier f=0. . an =(8*cos((9*pi*n)/2) . bn =(8*sin((9*pi*n)/2) . end f=f+a0. W=2*pi/T. %valores de an y bn clc clear all close all T=2. syms t a0=0. ………………………….8*cos((11*pi*n)/2))/(pi^2*n^2). bn =(8*sin((9*pi*n)/2) . W=2*pi/T.8*cos((11*pi*n)/2))/(pi^2*n^2).