Question: Matlab form please fou Evercise 3.1 dat Exercise 3.1.5 Consider the following data. ti 1.0 1.5 2.0 2.5 3.0 i1.1 1.2 1.3 1.3 14 (a)
fou Evercise 3.1 dat Exercise 3.1.5 Consider the following data. ti 1.0 1.5 2.0 2.5 3.0 i1.1 1.2 1.3 1.3 14 (a) Set up an overdetermined system of the form (3.1.3) for a straight line passing ercise 3 through the data points. Use the standard basis polynomials 1(t) = 1, P2(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 tlMATLAB to solve a square system Ar = b by Gaussian elimination,6 Some useful MATLAB commands: t= 1:.5:3; t-t'; s-ones (5,1); A= [s t]; We already know that MATLAB uses Gaussian elimination with partial ing in the square case. In the next two sections you will find out what ATLA does in the overdetermined case. e) Use the MATLAB plot command to plot the five data points and you squares straight line. Type help plot for information about using command, or search in MATLAB's help browser. ts and your l la tie MATLAB tocompue I l he norm of te residual. 161L
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
