Revision as of 12:24, 4 September 2008 by Chanw (Talk)

MATLAB Code

%Wei Jian Chan
%chanw@purdue.edu
%Ece 301 HW 1.2

%Importing the wavefile into matlab
%Note that the file must reside within the directory of Matlab
%Should be My Documents/MATLAB
[jpforward,smprate,bitrate] = wavread('jpforward.wav');
wavplay(jpforward,smprate);

%Create a array to sore the wave file backwardly
jpbackward = zeros(size(jpforward));
jpsize = length(jpbackward);

%Reversing the wave file
for i = 1:jpsize
    jpbackward(jpsize - (i - 1)) = jpforward(i);
end
wavplay(jpbackward, smprate);
%I can't really heard what they're saying in the song

%From the helpfile we know that smprate is rate of the file, thus by
%altering the sampling rate, we can change the speed of the file
smphalf = smprate/2;
wavplay (jpbackward,smphalf);

Message in file

The quality is so bad, but what i can hear is the word "death" if played forward , and "life" if played backwards

Alumni Liaison

Questions/answers with a recent ECE grad

Ryne Rayburn