Please help with the four matlab codings of the following questions: 1. Create y
ID: 1845805 • Letter: P
Question
Please help with the four matlab codings of the following questions:
1. Create your own audio file that is at least 4 seconds long (the exact time duration is not really important, but do not make the file too long). Use the wavrecord command in MATLAB and a sampling frequency of 10000 Hz. You can also try to find a wav file online. Use the sound command in MATLAB to play the sound. Make sure the recording is fine.
2. Using the wavread command, read the signal into a vector called x. Also read the sampling frequency in to a variable called Fs. Make sure you understand what this sampling frequency means. Plot the received signal as a function of time. Your time axis must have units in seconds.
Questions 3 and 4 are stated below:
Explanation / Answer
this is very simple. you can download fileformat software where you can convert any music or tone to .wav format.
.wav format is really handy for matlab exercize.
when you record the tone make sure the Fs = 10000. by default it is something 41000. so change it.
now in MATLAB store this file in the vector X.
here as your sound file is for 4sec. so number of sample would be 4*10000. so the define the vector X such that its dimension >40000.
take n = 0:Ts:4 where Ts = 1/Fs
so you have X(n)= somefile.wav.
now when yu do X(2n) it means you are compressing the file so you are taking the even sample points from the actual sampled tone.
so X(2n) has to imension half of X(n).
as you are compressing so when you play X(2n) it would sound shriller.
B) for the next part you first store the values of x(n) into another vector Y(n) where t is some constant
y(n) = x(n +t);
similarly z(n) = x(n+2t);
and then define a new vector
p(n) = x(n) + 0.91y(n) + 0.81z(n)
now similar way play p(n) and the check for the clear sound