Documente Academic
Documente Profesional
Documente Cultură
FACULTAD DE INGENIERA
PRCTICA #3 (MATLAB)
LA PAZ BOLIVIA
1. OBJETIVOS
a. Objetivo general
b. Objetivos especficos
Procedimiento
t=0:.1:4;
z=0;
subplot(2,1,1)
title('ARMONICAS INDIVIDUALES');
for n=1:11
y=alternada(n,t);
% if n==1
% plot(t,y,'y')
% end
if n==3
plot(t,y,'o-g')
end
if n==5
plot(t,y,'+-b')
end
if n==7
plot(t,y,'*-c')
end
if n==9
plot(t,y,'+-r')
end
if n==11
grid on
plot(t,y,'.--k')
end
hold on
end
legend('3era','5ta','7ma','9na','11va',4);
subplot(2,1,2)
title('SUMATORIAS DE ARMONICAS');
t=0:.1:12.5;
for n=1:11
y=alternada(n,t);
z=z+y;
if n==1
plot(t,z,'r')
end
if n==3
plot(t,z,'m')
end
if n==5
plot(t,z,'g')
end
if n==7
plot(t,z,'c')
end
if n==9
plot(t,z,'y')
end
if n==11
grid on
plot(t,z,'b')
end
hold on
end
legend('1Arm','(1+2+3)Arm','(1+2+3+4+5)Arm','(1+2+3+4+5+6+7)Arm','(1+2+
3+4+5+6+7+8+9)Arm','(1+2+3+4+5+6+7+8+9+10+11)Arm',4)
t=0:.1:4;
z=0;
subplot(2,1,1)
title('ARMONICAS INDIVIDUALES');
for n=1:11
y=impar(n,t);
if n==3
plot(t,y,'o-g')
end
if n==4
plot(t,y,'k')
end
if n==5
plot(t,y,'+-b')
end
if n==6
plot(t,y,'k')
end
if n==7
plot(t,y,'*-c')
end
if n==8
plot(t,y,'y')
end
if n==9
plot(t,y,'+-r')
end
if n==10
plot(t,y,'y')
end
if n==11
grid on
plot(t,y,'.--k')
end
hold on
end
legend('3era','4ta','5ta','6ta','7ma','9na','10ma','11va',4);
subplot(2,1,2)
title('SUMATORIAS DE ARMONICAS');
t=0:.1:12.5;
for n=1:11
y=impar(n,t);
z=z+y;
if n==1
plot(t,z,'r')
end
if n==3
plot(t,z,'m')
end
if n==5
plot(t,z,'g')
end
if n==7
plot(t,z,'c')
end
if n==9
plot(t,z,'y')
end
if n==11
grid on
plot(t,z,'b')
end
hold on
end
legend('1Arm','(1+2+3)Arm','(1+2+3+4+5)Arm','(1+2+3+4+5+6+7)Arm','(1+2+
3+4+5+6+7+8+9)Arm','(1+2+3+4+5+6+7+8+9+10+11)Arm',4)
function j=impar(n,t)
function i=par(n,t)
>>bi=pi;
>>ci=1.5*pi;
>>d=0.6*sin(ai+0.02*pi*t)
+0.3*sin(bi+0.06*pi*t)...
+0.2*sin(ci+0.10*pi*t);
>>par=zeros(1,N);
>>impar=zeros(1,N);
>>for i=1:N
>>par(i)=(d(i)+d(N+1-i))/2;
>>impar(i)=(d(i)-d(N+1-i))/2;
>>end
>>subplot(3,1,1);
>>plot(t,d, 'b');
>>title('Onda Original')
>>subplot(3,1,2);
>>plot(t,par, 'g');
>>title('Componente Par')
>>subplot(3,1,3) ;
>>plot(t,impar, 'r')
>>title('Componente Impar')
Conclusiones
Bibliografa y Referencias