This is easy work if you are good for using matlab. It is an assignment on Linear Algebra. please complete this task carefully according to the requirements in the document

Today we are going to create some music and show that we can treat sampled music as (really

long) vectors. Then, we will show that we can manipulate the music to remove certain elements of

the music.

1. Create the beginnings of a music file. We will do this by remembering that sine waves and

cosine waves are projections of uniform circular motion. In our case, the easiest thing to do is to

use complex polar notation to create a vector that rotates around the complex plane. So, create a

complex vector that rotates:

xx0=zeros(24000,1);for kk=1:24000,xx0(kk)=exp(i*kk*pi/16);end

(a). Now plot these values so they are clearly complex rotations:

for kk=1:20, plot(real(xx0(kk)), imag(xxO(kk)),’r.’), hold on, pause(0.5), end

(b) Show that the real part is a cosine, and the imaginary part is a sine. (You may need to

zoom in on your image to understand what is going on here.)

hold off, plot(real(xx0),’b’), hold on,plot(imag(xx0), ‘r’)

(c) Now play out the sound:

sound(real(xxOs),8000);

2. Next, I want to explore the role of linear difference equations and their connection to signal

processing/linear filtering. I realize that you are not accustomed to frequency-based decompositions

of functions/signals/voice traces. However, you do know that cos 2nt oscillates a lot faster then

cos 2. The idea of frequency-based filtering simply says that we place restrictions on how fast we

let a signal oscillate. To see the possibilities here, I want you to analyze and extend the work in

$4.8 Example 3. So, consider the linear difference equation

V2 1

V2

Yk+2 +

4 2

Yk+1 +

Yk = 2k

4

(i) Solve the associated homogeneous equation by setting zx = 0 and substituting in yk = pk.

(ii) You will find that r is a complex number, so write it in the form r = ei. Then find Yk.

(iii) Check that yk is a solution of the homogeneous equation.

(iv) Consider a signal of the form yk = cos 4t, and, sampling the function every second,

generate it in matlab for some 10000 points. Plot the function which results and change the axis

until you can see that you have sampled points taken from a cosine.

(v) Pass the function through the filter by calculating zk using the filter equation above.

(vi) Generate a cosine wave of higher frequency, of the form yk = cos 3t, again sampling

it every second for 10000 points.

(vii) Pass this higher-frequency function through the filter. What do you get? Why? (Hint:

Look back at the solution of the homogeneous equation.) Since this higher frequency is not allowed

to pass through the filter, our filter is a version of a low-pass filter (i.e., it lets the low frequencies

of some range pass through).

(viii) Use matlab to add together the previous two signals and pass it through the filter.

Play the before and after signals out using the sound command from question 1. Can you hear the

differences?

(ix) Experiment with passing the following functions through the filter and try to understand

what you get: cost, cos žt, cost, cos at, cos 5t. For the last case, can you figure out what is

going on (Hint: have you ever heard of aliasing?)?