Using SVD for Least Squares Problems in MATLAB

In summary, the average monthly temperature in degrees Fahrenheit for Dubuque, Iowa from 1964 to 1975 is given by the following equation: T = a0 + sum from 1 to k of ai cos(2*pi*i*m/12) + sum from 1 to k of bi sin(2*pi*i*m/12). The solution to this equation is found by using the SVD and MATLAB routines. The coefficients of the unknowns, a_0, a_1, a_2, b_1, b_2 are found by using the data and the equations. A plot is also created to display the data and the equations.
  • #1
squenshl
479
4

Homework Statement


The link http://www.york.ac.uk/depts/maths/data/ts/welcome.htm gives the average monthly temperature T in Fahrenheits for Dubuque, Iowa from 1964 to 1975. Let T = a0 + sum from i = 1 to k of ai cos(2*pi*i*m/12) + sum from i = 1 to k of bi sin(2*pi*i*m/12) where m is the number of months from January, 1964.
Use the SVD and MATLAB to find suitable values of a and b for k = 2 and k = 4. As part of your answer include a plot which displays the data abd T for k = 2 and k = 4.

Homework Equations


SVD equations

The Attempt at a Solution


How do I even start to answer the question. Do I put the 144 data values in matrix form and use the svd command in matlab.
 
Physics news on Phys.org
  • #2


Have you studied how to use the SVD in getting the best solution to an overdetermined system of equations?

The way I look at this problem, you have a linear equation for each month of data. For month j , the right hand of the equation is the temperature [tex]T_j[/tex]. For the case k = 2, the unknowns are [tex] a_0, a_1, a_2, b_1, b_2 [/tex]

For example, for the month 5, the equation is

[tex] a_0 + a_1 \cos(2\pi(1)(5/12)) + a_2 \cos(2\pi(2)(5/12)) + b_1 sin(2\pi(1)(5/12) + b_2 sin(2\pi(2)(5/12) = T_5 [/tex]

(The coefficients of the unknowns are all numerical values than you can compute.)

The matrix is the big matrix that defines this system of linear equations.

There are routines in MATLAB to read data from files and construct matrix entries from computations. I don't think you are meant to type-in each entry of the matrix by hand.
 
  • #3


I just copied the data from the website and then applied the svd command in MATLAB to get 3 matrices U, S, V.
 
Last edited:
  • #4


And how does that answer your question?
 
  • #5


What have you been taught about using SVD as an approach to solving a least squares problem?
 

What is Singular Value Decomposition (SVD)?

Singular Value Decomposition (SVD) is a mathematical technique used to decompose a matrix into three separate matrices, which helps in simplifying complex calculations and enables efficient data analysis. It is widely used in various fields such as signal processing, image compression, and data mining.

What is the purpose of using SVD?

The main purpose of using SVD is to reduce the dimensionality of data, which allows for easier interpretation and analysis. It also helps in identifying important patterns and relationships within the data, making it a valuable tool in data analysis and machine learning.

How does SVD work?

Singular Value Decomposition works by breaking down a matrix into three separate matrices: U, Σ, and V. U and V are orthogonal matrices that contain the left and right singular vectors respectively, while Σ is a diagonal matrix containing the singular values. These matrices are used to reconstruct the original matrix, or to approximate it with a lower rank matrix.

What are the applications of SVD?

SVD has a wide range of applications in various fields such as image processing, data compression, and recommendation systems. It is also used in data analysis techniques like principal component analysis (PCA) and latent semantic analysis (LSA).

What are the advantages of using SVD?

One of the main advantages of using SVD is that it allows for dimensionality reduction, making it easier to analyze and interpret complex data. It also helps in identifying important features and patterns in the data, and can be used for data compression and noise reduction. SVD is also a stable and reliable technique, making it a popular choice in many scientific and engineering applications.

Similar threads

  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Advanced Physics Homework Help
Replies
6
Views
2K
  • Introductory Physics Homework Help
Replies
5
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
19K
Replies
6
Views
1K
Replies
1
Views
1K
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Back
Top