1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| /////////////////////////////////////clear
f0=493.88;
f=f0.*(1:30);
%harmonique
Af=493.88*[
0.8897, 2.0001;
1.7834, 0.7463;
2.6808, 1.2558;
3.5879, 0.9798;
4.4991, 0.3173;
5.4244, 0.1693;
6.3598, 0.2432;
7.3115, 0.1432;
8.2915, 0.0108;
9.2715, 0.0494;
10.2697, 0.0554;
11.2902, 0.0431;
12.3107, 0.0209;
13.4324, 0.0131;
14.5339, 0.0322;
15.6657, 0.0071;
16.8219, 0.0052;
18.0165, 0.0010;
19.2294, 0.0018;
20.4908, 0.0008;
21.7867, 0.0012;
23.0825, 0.0009;
24.4391, 0.0003;
25.8565, 0.0003;
27.2941, 0.0004;
28.7114, 0.0001;
30.2705, 0.0001;
31.6271, 0.0001;
32.3965, 0.0011;
33.1862, 0.0006];
t=0:1/44.1e3:4;
for i=1:25
y(i,:)=1.5e-4.*Af(i,2).*exp(-3.5.*t)...
.*sin(2.*pi.*f(i).*t);
end
Y=sum(y);
subplot(211)
plot(t,Y)
sound(Y,44.1e3)
///////////////////////// |
Partager