Tonos mezclados.

Contents

Armonicos

n1 = 1.0;
n2 = 2*n1;
n3 = 3*n1;
n4 = 4*n1;
n5 = 5*n1;
n6 = 6*n1;
t = linspace(-10,10,750);
x1 = sin(2*pi*t*n1) + sin(2*pi*t*n2) + sin(2*pi*t*n3) +...
    sin(2*pi*t*n4) + sin(2*pi*t*n5) + sin(2*pi*t*n6);
x1 = x1.*exp(-t.^2/5.0);

figure
plot(t,x1)

Anarmonicos

n1 = 10.0*rand;
n2 = 10.0*rand;
n3 = 10.0*rand;
n4 = 10.0*rand;
n5 = 10.0*rand;
n6 = 10.0*rand;
% t = linspace(0,4,750);
x2 = sin(2*pi*t*n1) + sin(2*pi*t*n2) + sin(2*pi*t*n3) +...
    sin(2*pi*t*n4) + sin(2*pi*t*n5) + sin(2*pi*t*n6);
x2 = x2.*exp(-t.^2/5.0);

figure
plot(t,x2)