Question: 2. Write a MATLAB script to perform a linear regression. Given x [0,1,2,3,4,5], and y = [5, 7, 9,11, 13, 15]. Use polyfit to
2. Write a MATLAB script to perform a linear regression. Given x [0,1,2,3,4,5], and y = [5, 7, 9,11, 13, 15]. Use polyfit to perform regression analysis with a first-degree polynomial equation (y coefficient a, and b here after regression. ax+b). Find the = = Then use polyval to evaluate y at x = 4.5. Write your answer inside the script as a comment. The answer should contain value of a, and b, and the value of y at x = 4.5.
Step by Step Solution
There are 3 Steps involved in it
Solutions Step 1 Heres a MATLAB script that performs linear regression using polyfit and evaluates y ... View full answer
Get step-by-step solutions from verified subject matter experts
