Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please solve 3.1.6, thanks! Exercise 3.1.6 Repeat Exercise 3.1.5, but this time compute the best least squares polynomial of degree 2. Notice that in this
Please solve 3.1.6, thanks!
Exercise 3.1.6 Repeat Exercise 3.1.5, but this time compute the best least squares polynomial of degree 2. Notice that in this case the norm of the residual is smaller. This is to be expected; the space of quadratic polynomials contains the space of linear polynomials, so the quadratic fit should be better than-or in any case no worse than-the linear polynomial fit. Exercise 3.1.5 Consider the following data. ti1.01.5 2.0 2.5 3.0 yil.1 1.2 1.3 1.3 1.-4 (a) Set up an overdetermined system of the form (3.1.3) for a straight line passing through the data points. Use the standard basis polynomials -1, (b) Use MATLAB to calculate the least-squares solution of the system from part (a). This is a simple matter. Given an overdetermined system Ax - b, the MATLAB command x - A\b computes the least squares solution. Recall that this is exactly the same command as would be used to tell MATLAB to solve a square system Ab by Gaussian elimination.16 Some useful MATLAB commands: We already know that MATLAB uses Gaussian elimination with partial pivot- ing in the square case. In the next two sections you will find out what MATLAB does in the overdetermined case. X2 1(ts) 2(ts) Exercise 3.1.6 Repeat Exercise 3.1.5, but this time compute the best least squares polynomial of degree 2. Notice that in this case the norm of the residual is smaller. This is to be expected; the space of quadratic polynomials contains the space of linear polynomials, so the quadratic fit should be better than-or in any case no worse than-the linear polynomial fit. Exercise 3.1.5 Consider the following data. ti1.01.5 2.0 2.5 3.0 yil.1 1.2 1.3 1.3 1.-4 (a) Set up an overdetermined system of the form (3.1.3) for a straight line passing through the data points. Use the standard basis polynomials -1, (b) Use MATLAB to calculate the least-squares solution of the system from part (a). This is a simple matter. Given an overdetermined system Ax - b, the MATLAB command x - A\b computes the least squares solution. Recall that this is exactly the same command as would be used to tell MATLAB to solve a square system Ab by Gaussian elimination.16 Some useful MATLAB commands: We already know that MATLAB uses Gaussian elimination with partial pivot- ing in the square case. In the next two sections you will find out what MATLAB does in the overdetermined case. X2 1(ts) 2(ts)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started