Practica 3

Páginas: 4 (774 palabras) Publicado: 4 de noviembre de 2015
Practica 3

%FUNDAMENTAL%
clear all,clf,clc
t=0:0.001:1;
y=(1/2); %A=1, comp cd
cn=1/pi; %cn=A/pi
y1=y-cn*sin(2*pi*t); %Esto es f1(t)
subplot(4,3,1)
plot(t,y1)
title('Fundamental y1=f1(t)')xlabel('t')
ylabel('f(t)')
grid
axis([0 1 -.2 1])
% t=0-1 f(t)=-.2-1

%SEGUNDA ARMONICA Y2%
y2=-cn*(1/2)*sin(4*pi*t)% y2=f2(t)
subplot(4,3,2)
plot(t,y2)
title('Segunda componente =f1(t)')
grid
axis([0 1-.2 1])

%SUMA DE LAS DOS FUNCIONES%
y12=y1+y2
subplot(4,3,3)
plot(t,y12)
title('Suma de las dos primeras componentes')
grid
axis([0 1 -.2 1])

%TERCERA COMPONENTE%
y3=-cn*(1/3)*sin(6*pi*t)%y3=f3(t)
subplot(4,3,4)
plot(t,y3)
title('Tercera componente =f3(t)')
grid
axis([0 1 -.2 1])

%SUMA DE LA TERCERA CON LAS DOS PRIMERAS%
y13=y12+y3
subplot(4,3,5)
plot(t,y13)
title('Suma de las tres primerascomponentes')
grid
axis([0 1 -.2 1])

%CUARTA COMPONENTE%
y4=-cn*(1/4)*sin(8*pi*t)% y4=f4(t)
subplot(4,3,6)
plot(t,y4)
title('Cuarta componente =f4(t)')
grid
axis([0 1 -.2 1])

%SUMA DE LA CUARTACOMPONENTE CON LAS 4%
y14=y13+y4
subplot(4,3,7)
plot(t,y14)
title('Suma de las cuatro primeras componentes')
grid
axis([0 1 -.2 1])

%QUINTA COMPONENTE%
y5=-cn*(1/5)*sin(8*pi*t)% y4=f4(t)
subplot(4,3,8)plot(t,y4)
title('Quinta componente =f5(t)')
grid
axis([0 1 -.2 1])

%SUMA DE LA QUINTA COMPONENTE CON LAS 4%
y15=y14+y5
subplot(4,3,9)
plot(t,y15)
title('Suma de las cuatro primeras componentes')grid
axis([0 1 -.2 1])


Aproximación de la recta con 5 términos
clear all,clf,clc
t=0:0.001:1;
n=5;
y=(1/2); %A=1, comp cd
cn=1/pi; %cn=A/pi
x=zeros(size(t))
hold on
for n=1:1:ny1=-cn*(1/n)*sin((n)*pi*2*t)
x=y1+x;
plot(t,x+(1/2))
end
title('Aproximacion con 5 terminos')
hold off


“Aproximacion con 60 terminos de la función de la recta”
clear all,clf,clc
t=0:0.001:1;
n=60;
y=(1/2); %A=1, comp cdcn=1/pi; %cn=A/pi
x=zeros(size(t))
for n=1:1:n
y1=-cn*(1/n)*sin((n)*pi*2*t)
x=y1+x;
plot(t,x+(1/2))
end
title('Aproximacion con 60 terminos')

“Serie de la función exponencial”
NOTA: DUDA PARA SUBIR...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Practica 3 Quimica 3
  • Practica 3
  • Práctica 3
  • practica 3
  • practica 3
  • practica 3
  • Practica 3
  • Practica 3

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS