ONDA COMPLETA
>> T=100;
t= 0:(3*T)-1;
p=(t/T);
s=20.*cos((2*pi).*p);
s1=15.*cos(3*(2*pi).*p);
s2=11.*cos(5*(2*pi).*p);
s3=9.*cos(7*(2*pi).*p);
s4=7.*cos(9*(2*pi).*p);
s5=1.*cos(11*(2*pi).*p);
salida=s+s1+s2+s3+s4+s5;
plot (salida)
ONDA "S"
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> salida=s;
>> plot (salida)
ONDA " S1 "
>> T=100;
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s1=15.*cos(3*(2*pi).*p);
>> salida=s1;
>> plot (salida,'r')
ONDA " S2 "
>> T=100;
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s2=11.*cos(5*(2*pi).*p);
>> salida=s2;
>> plot (salida, 'y')
ONDA " S3 "
>> T=100;
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s3=9.*cos(7*(2*pi).*p);
>> salida=s3;
>> plot (salida, 'm')
ONDA " S4 "
>> T=100;
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s4=7.*cos(9*(2*pi).*p);
>> salida=s4;
>> plot (salida, 'g')
ONDA" S5 "
>> T=100;
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s5=1.*cos(11*(2*pi).*p);
>> salida=s5;
>> plot (salida, 'k')
SUPERPOSICIÓN DE ONDAS
CON "S+S1"
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> s1=15.*cos(3*(2*pi).*p);
>> salida=s+s1;
>> plot (salida)
CON "S+S1+S2"
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> s1=15.*cos(3*(2*pi).*p);
>> s2=11.*cos(5*(2*pi).*p);
>> salida=s+s1+s2;
>> plot (salida)
CON "S+S1+S2+S3"
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> salida=s+s1;
>> s2=11.*cos(5*(2*pi).*p);
>> s3=9.*cos(7*(2*pi).*p);
>> salida=s+s1+s2+s3+s4+s5;
>> salida=s+s1+s2+s3;
>> plot (salida)
CON "S+S1+S2+S3+S4"
>> T=100;
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> s1=15.*cos(3*(2*pi).*p);
>> s2=11.*cos(5*(2*pi).*p);
>> s3=9.*cos(7*(2*pi).*p);
>> s4=7.*cos(9*(2*pi).*p);
>> salida=s+s1+s2+s3+s4;
>> plot (salida)
VARIANDO " T "
>> T=200;
>> t= 0:(3*T)-2;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> s1=15.*cos(3*(2*pi).*p);
>> s2=11.*cos(5*(2*pi).*p);
>> s3=9.*cos(7*(2*pi).*p);
>> s4=7.*cos(9*(2*pi).*p);
>> s5=1.*cos(11*(2*pi).*p);
>> salida=s+s1+s2+s3+s4+s5;
>> plot (salida)
VARIANDO " t "
>> t= 0:(3*T)-8;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> s1=15.*cos(3*(2*pi).*p);
>> s2=11.*cos(5*(2*pi).*p);
>> s3=9.*cos(7*(2*pi).*p);
>> s4=7.*cos(9*(2*pi).*p);
>> s5=1.*cos(11*(2*pi).*p);
>> salida=s+s1+s2+s3+s4+s5;
VARIANDO " t "
>> t= 0:(9*T)-8;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> s1=15.*cos(3*(2*pi).*p);
>> s2=11.*cos(5*(2*pi).*p);
>> s3=9.*cos(7*(2*pi).*p);
>> s4=7.*cos(9*(2*pi).*p);
>> s5=1.*cos(11*(2*pi).*p);
>> salida=s+s1+s2+s3+s4+s5;
>> plot (salida)
ESPECTRO DE LA ONDA
>> T=100;
>> t= 0:(3*T)-1;
>> p=(t/T);
>> s=20.*cos((2*pi).*p);
>> s1=15.*cos(3*(2*pi).*p);
>> s2=11.*cos(5*(2*pi).*p);
>> s3=9.*cos(7*(2*pi).*p);
>> s4=7.*cos(9*(2*pi).*p);
>> s5=1.*cos(11*(2*pi).*p);
>> salida=s+s1+s2+s3+s4+s5;
>> espectro=fft(salida);
>> esp= abs(espectro);
>> plot(p,salida)
>> stem(esp);