First time help - Programmers Heaven

#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# First time help

Posts: 1Member
Need major help on an assignment. ANy help would be nice. I have a image compression bonus assignment as follows

typing "load image.mat" in the command prompt. There should now be the variable
A in your workspace. A has 3 dimensions. The rst two are the height and width
of the image, the last dimension is of length 3. This is because images have 3 color
planes.
2. View the image with the command "image(A)"
3. Turn A into a matrix of doubles with the command "double(A)".
4. Since each color plane can be considered a square matrix, we can perform an eigenvalue
decomposition to each plane. Do this with the function "eig(A)".
5. Try sorting the eigenvalues of each plane by magnitude (absolute value of the values).
Approximate each bit plane by only using the 100 most in
uential eigenvalues and
eigenvectors. Repeat this for 50, 25, 10, and 5. Reconstruct all 3 color planes with
each approximation. Name the reconstruction B.
6. There are likely to be imaginary values in B. Get rid of these with the command
"real(B)". Round the values of B into integers with "round(B)". Turn B into a matrix
of uint8's with "uint8(B)". View all the images. How good is the approximation? Plot
the mean squared error between A and B as a function of the number of eigenvalues
you keep.
7. Repeat steps 5 and 6 by using the eigenvalues of smallest magnitude."

I have been able to import the image, make it doubles, then i seperated it into 3 matrices so i could apply eig() onto it. thats where im lost.