Question: Task 5: Write a script for linear least square regression. (10points) Do not use any of MATLAB's built in functions or commands. This MUST be

 Task 5: Write a script for linear least square regression. (10points)

Task 5: Write a script for linear least square regression. (10points) Do not use any of MATLAB's built in functions or commands. This MUST be implemented using matrix and vector components via FOR loops in your construction. Spring 2017 EEN 357 Engineering Analysis for Mechanical Engineers For a given dataset of independent variable x, and dependent variable y where i 1,2, ....n the linear regression model is where ao and an are regression parameters. The least squares estimation is used to minimize the sum of the n squared errors the parameters can be computed as: Using the algorithm, write the function for linear approximation of y: This function must have the interface DATA, YDATA.) where XDATA and YDATA are the vectors of n data points and it should return the value of at given x. Ifxis a vector, the function should return a vector y wfhere each element of ycorresponds to the element of X

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!