Line 9: Line 9:
 
----
 
----
 
===Answer 1===
 
===Answer 1===
Write it here.
+
The signal we want is <math>x(t) = cos(440 * 2\pi)</math>.
 +
 
 +
We can first create a vector of sample times.  In this case, we'll let the sample frequency be 1320 Hz over a sample interval of [0,1]
 +
 
 +
t = 0:(1/1320):1;
 +
 
 +
Next, we can generate the sound samples vector from the sample times vector.
 +
 
 +
y = cos(440*2*pi*t);
 +
 
 +
Finally, we play the signal by using the "sound" command, which needs the user to specify the sound vector and the sample rate of that vector.  Our sample was 1320.
 +
 
 +
sound(y, 1320);
 +
 
 +
The sample frequency was chosen so that it was more than twice the note frequency, so that the signal could be completely recovered from this sample.
 
===Answer 2===
 
===Answer 2===
 
Write it here.
 
Write it here.

Revision as of 19:45, 3 September 2011

Sampling of an A 440

Explain how one can use MATLAB to play an A 440. Discuss your choice of sampling rate. (Feel free to post a sound file of your output.)


Share your answers below

You will receive feedback from your instructor and TA directly on this page. Other students are welcome to comment/discuss/point out mistakes/ask questions too!


Answer 1

The signal we want is $ x(t) = cos(440 * 2\pi) $.

We can first create a vector of sample times. In this case, we'll let the sample frequency be 1320 Hz over a sample interval of [0,1]

t = 0:(1/1320):1;

Next, we can generate the sound samples vector from the sample times vector.

y = cos(440*2*pi*t);

Finally, we play the signal by using the "sound" command, which needs the user to specify the sound vector and the sample rate of that vector. Our sample was 1320.

sound(y, 1320);

The sample frequency was chosen so that it was more than twice the note frequency, so that the signal could be completely recovered from this sample.

Answer 2

Write it here.

Answer 3

write it here.


Back to ECE438 Fall 2011 Prof. Boutin

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood