Singular value decomposition

  • Thread starter squenshl
  • Start date
  • #1
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.
 

Answers and Replies

  • #2
Stephen Tashi
Science Advisor
7,713
1,519


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
479
4


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
HallsofIvy
Science Advisor
Homework Helper
41,847
966


And how does that answer your question?
 
  • #5
D H
Staff Emeritus
Science Advisor
Insights Author
15,415
687


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

Related Threads on Singular value decomposition

  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
2
Views
4K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
9
Views
2K
  • Last Post
Replies
0
Views
2K
  • Last Post
Replies
0
Views
2K
Replies
1
Views
2K
Replies
2
Views
3K
Replies
2
Views
1K
Top