Line 118: Line 118:
 
   end
 
   end
 
end
 
end
 +
[[Media:HailPurdue1_ECE301Fall2008mboutin.wav]]

Revision as of 09:52, 4 September 2008

%Jessica Sparks %Homework 1 A = 880; B = 987.84; Bs = 932.32; C = 1046.56; D = 1174.72; E = 659.28; F = 698.48; G = 784; loop=3;

delta = .00005; while (loop ~= 0)

 loop=loop-1;
 fprintf( 'loop = %d', loop);
 if loop == 2
   mult= 1;
 elseif loop ==1
   mult = .5;
 else
   mult=2;
 end
 t1= mult*(0:delta:.5); %seconds
 y1 = sin(2*pi*t*E);
 t2= mult*(.5:delta:.75);
 y2 = sin(2*pi*t*F);
 t3= mult*(.75:delta:1);
 y3 = sin(2*pi*t*G);
 t4= mult*(1:delta:1.25);
 y4 = sin(2*pi*t*A);
 t5= mult*(1.25:delta:1.5);
 y5 = sin(2*pi*t*B);
 t6= mult*(1.5:delta:1.75);
 y6 = sin(2*pi*t*C);
 t7= mult*(1.75:delta:2);
 y7 = sin(2*pi*t*C);
 t8= mult*(2:delta:2.25);
 y8 = sin(2*pi*t*D);
 t9= mult*(2.25:delta:2.35);
 y9 = sin(2*pi*t*D);
 t10= mult*(2.35:delta:2.5);
 y10 = sin(2*pi*t*D);
 t11= mult*(2.5:delta:2.75);
 y11 = sin(2*pi*t*A);
 t12= mult*(2.75:delta:2.85);
 y12 = sin(2*pi*t*B);
 t13= mult*(2.85:delta:3);
 y13 = sin(2*pi*t*Bs);
 t14= mult*(3:delta:3.5);
 y14 = sin(2*pi*t*C);
 t15= mult*(3.5:delta:4);
 y15 = sin(2*pi*t*C);
 t16= mult*(4:delta:4.25);
 y16 = sin(2*pi*t*C);
 t17= mult*(4.25:delta:4.5);
 y17 = sin(2*pi*t*B);
 t18= mult*(4.5:delta:4.75);
 y18 = sin(2*pi*t*A);
 t19= mult*(4.75:delta:5);
 y19 = sin(2*pi*t*B);
 t20= mult*(5:delta:5.25);
 y20 = sin(2*pi*t*C);
 t21= mult*(5.25:delta:5.5);
 y21 = sin(2*pi*t*C);
 t22= mult*(5.5:delta:5.75);
 y22 = sin(2*pi*t*B);
 t23= mult*(5.75:delta:5.85);
 y23 = sin(2*pi*t*F);
 t24= mult*(5.85:delta:6);
 y24 = sin(2*pi*t*G);
 t25= mult*(6:delta:6.25);
 y25 = sin(2*pi*t*A);
 t26= mult*(6.25:delta:6.35);
 y26 = sin(2*pi*t*G);
 t27= mult*(6.35:delta:6.5);
 y27 = sin(2*pi*t*F);
 t28= mult*(6.5:delta:7);
 y28 = sin(2*pi*t*B);
 t = [t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14]; %{t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28%}];
 y = [y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 y11 y12 y13 y14]; %y15 y16 y17 y18 y19 y20 y21 y22 y23 y24 y25 y26 y27 y28}%];
 if loop ==2
   wavwrite(y, 'H:\ECE301\HailPurdue1.wav');
 elseif loop == 1
   wavwrite(y, 'H:\ECE301\HailPurdue2.wav');
 else
   wavwrite(y, 'H:\ECE301\HailPurdue3.wav');
 end

end Media:HailPurdue1_ECE301Fall2008mboutin.wav

Alumni Liaison

Recent Math PhD now doing a post-doctorate at UC Riverside.

Kuei-Nuan Lin