Question: MATLAB: Table 1 shows the experimental data obtained in problem-solving assignment #3. Recall that we found the coefficients for a least-squares fit to this data
MATLAB:
Table 1 shows the experimental data obtained in problem-solving assignment #3. Recall that we found the coefficients for a least-squares fit to this data for both 1st- and 2nd-order polynomials by hand and using Visual C#. Recall that we derived the formulas for a1 and a0, the two coefficients for a 1st-degree polynomial fit by minimizing the squared error:


Also recall that the sum function will give a vector of column totals, but sum(matrix,2) will give you a row vector of totals which means in this case a single number since there is only one row of data in X and Y. Run the Matlab commands shown in Listing 1 Use polyfit to determine the 1st-order coefficients
I KEEP GETTING THIS ERROR : Undefined function 'SUM' for input arguments of type 'double'.
Table 1: Experimental Data 16 26 31 38 48 53 19 27 40 39 46 50 Table 1 shows the experimental data obtained in problem-solving assignment #3. Recall that we found the coefficients for a least-squares fit to this data for both 1st- and 2nd-order polynomials by hand and using Visual C# Recall that we derived the formulas for a, and ao, the two coefficients for a 1st-degree polynomial fit by minimizing the squared error: and a= y--a, x where x represents the average of x and y represents the average of y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
