Question: Problem 4 (7 points) Develop a Matlab function myExpoFit that finds the best fit of the function f(z) be togiven data points (ri, vi) using

 Problem 4 (7 points) Develop a Matlab function myExpoFit that finds
the best fit of the function f(z) be togiven data points (ri,

Problem 4 (7 points) Develop a Matlab function myExpoFit that finds the best fit of the function f(z) be togiven data points (ri, vi) using least squares regression. The input arguments to the function must be the two vectors x and y that contain the values of the data points. The output of the function shall be the two scalars b and m. To solve the required linear least squares regression, use your function myLinReg. Use problem 2 to help you debug your function. Insert Comment % , Breakpoints Run Run and Advance EDIT BREAKPOINTS RUI uments MATLAB Homework4 Editor - /Users/lambui/Documents/MATLAB/Home myLinReg.m xmyCubicFit.m Problem5.m function [a0_al-E] = myLinReg (x,y) polyfit ( x, y, 1); 2- 3 [a] %% residual finding ry-polyval (a,x); = Error i.e sum of square of residual E = sum (r."2); 7 8-a0 9- end 10

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!