MAT343_LAB06_v2 - MATLAB sessions Laboratory 6 MAT 343...

This preview shows page 1 - 3 out of 5 pages.

MATLAB sessions: Laboratory 6 MAT 343 Laboratory 6 The SVD decomposition and Image Compression In this laboratory session we will learn how to 1. Find the SVD decomposition of a matrix using MATLAB 2. Use the SVD to perform Image Compression. Introduction Let A be an m × n matrix ( m n ). Then A can be factored as A = USV T = . . . . . . . . . . . . u 1 u 2 . . . u m . . . . . . . . . . . . m × m σ 1 0 . . . 0 0 σ 2 . . . 0 0 0 . . . 0 0 0 . . . σ n . . . . . . . . . 0 0 0 . . . 0 m × n . . . . . . . . . . . . v 1 v 2 . . . v n . . . . . . . . . . . . T n × n (L6.1) By convention σ 1 σ 2 . . . σ n 0. U and V are orthogonal matrices (square matrices with orthonormal column vectors). Note that the matrix S is usually denoted by Σ, however we will use S to be consistent with MATLAB notation. One useful application of the SVD is the approximation of a large matrix by another matrix of lower rank. The lower-rank matrix contains less data and so can be represented more compactly than the original one. This is the idea behind one form of signal compression. The Frobenius Norm and Lower-Rank Approximation The Frobenius norm is one way to measure the “size” of a matrix a b c d F = p a 2 + b 2 + c 2 + d 2 and in general, k A k F = i,j a 2 ij 1 / 2 , that is, the square root of the sum of squares of the entries of A . If b A is an approximation to A , then we can quantify the goodness of fit by k A - b A k F . This is just a least-squares measure. The SVD has the property that, if you want to approximate a matrix A by a matrix b A of lower rank, then the matrix that minimizes k A - b A k F among all rank-1 matrices is the matrix b A = . . . u 1 . . . m × 1 σ 1 1 × 1 . . . v 1 . . . T 1 × n = σ 1 u 1 v T 1 In general, the best rank- r approximation to A is given by b A = . . . . . . . . . . . . u 1 u 2 . . . u r . . . . . . . . . . . . m × r σ 1 0 . . . 0 0 σ 2 . . . 0 0 0 . . . 0 0 0 . . . σ r r × r . . . . . . . . . . . . v 1 v 2 . . . v r . . . . . . . . . . . . T r × n = σ 1 u 1 v T 1 + σ 2 u 2 v T 2 + . . . + σ r u r v T r c 2016 Stefania Tracogna, SoMSS, ASU 1
Image of page 1

Subscribe to view the full document.

MATLAB sessions: Laboratory 6 and it can be shown that k A - b A k F = q σ 2 r +1 + σ 2 r +2 + . . . + σ 2 n (L6.2) The MATLAB command [U, S, V] = svd(A) returns the SVD decomposition of the matrix A , that is, it returns matrices U , S and V such that A = USV T .
Image of page 2
Image of page 3
  • Spring '08
  • FARISODISH
  • Math, matlab, Singular value decomposition, Stefania Tracogna

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern