Question: Please provide the matlab code solution for this problem. The objective of this exercise is to create a compressed copy of the image Gatlinburg, defined
Please provide the matlab code solution for this problem.
The objective of this exercise is to create a compressed copy of the image "Gatlinburg", defined in MATLAB. You can visualize the picture as follows S = load ('Gatling'); %%- the 'Gatling' file is pre-defined in MATLAB images (S .X): %%- S is a struct with 3 components colormap (S. map); Remember to comment all plotting commands (such as images) before submitting your code on Scorelator. Compute the singular values for the matrix S.X TASK: Save the singular values as a column vector in the file A06.dat Create a column vector containing the cumulative sum (read the help on cumsum) of the singular values divided by the sum of all singular values TASK: Save the resulting column vector in the file A07.dat Find the number of singular values required to capture at least 90% of the variance, i.e. the smallest index such that the value in the vector from Question 2 is greater than 0.90. TASK: Save the number of singular values to capture 90% of the variance in the file A08.dat Using the economy (or thin) singular value decomposition of S.X, save the first five left singular vectors. (Remark: if you visualize the approximation with images - as discussed in class - you should see a fairly accurate picture. Remember to comment all plotting commands such as images - before submitting your code on Scorelator.) TASK: Save the first five left singular vectors in the file A09.dat
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
