Matlab Programming Heres a sound file httpcarmauxcsgsuedumwe

Matlab Programming

Here\'s a sound file http://carmaux.cs.gsu.edu/~mweeks/csc4630/backwards.wav
(The file sound is in reverse so it will sound unclear)
Save it under your MATLAB directory (on a Mac, press the \"control\" key and click the mouse to show options), then use the \"wavread\" command to store the data in a variable. Store the sampling rate in a variable, too, since you will need it. Then use the \"sound\" command to play it.

As you should be able to hear, the message is unclear. In fact, it is backwards. You will need to reverse the array to straighten it out. Do that, and play the new version with the \"sound\" command. Next, use a \"disp\" command to print \"the word or phrase is:\" and then the word or phrase from the reversed data.

Here is a hint: suppose \"old_array\" has 100 values. We could access array values 1 to 100 with the command old_array(1:100). We can reverse that array with this:

>> new_array = old_array(100:-1:1);

Solution

[y, fs] = wavread(\'C:\\Users\\paramesh\\Downloads\\backwards.wav\')
sound(y,fs) %play back sonds the given wav file
disp(y)
disp(fs)

% now reversnig data
yArrLen = length(y)
fsArrLen = length(fs)
%creating new array
newY = y(yArrLen:-1:1)
newFs = fs(fsArrLen:-1:1)

% playing sound again
sound(newY,newFs) %play back sonds the given wav file
disp(newY)
disp(newFs)

Matlab Programming Here\'s a sound file http://carmaux.cs.gsu.edu/~mweeks/csc4630/backwards.wav (The file sound is in reverse so it will sound unclear) Save it

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site