Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider the following data. ti 1.0 1.5 2.0 2.5 3.0 Yi 1.1 1.2 1.3 1.3 1.4 (a) Set up an overdetermined system of the
Consider the following data. ti 1.0 1.5 2.0 2.5 3.0 Yi 1.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(t) = 1, 02(t) = t (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 Ax = b by Gaussian elimination.2 Some useful MATLAB commands: t = 1.5:3; t = t'; s = ones (5,1); A = [st]; 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. (c) Use the MATLAB plot command to plot the five data points and your least squares straight line. Type help plot for information about using the plot command. (d) Use MATLAB to compute ||r||2, the norm of the residual.
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