Question: Using matlab solve the following: matlab coding Write a function to fit data to a line of the form y=ax+b. Use the following equations to
Using matlab solve the following: matlab coding
Write a function to fit data to a line of the form y=ax+b. Use the following equations to obtain the line properties (the function name is myline):

Use these four data points (1,1),(2,2),(4,2),(5,3) to test your function.
Verify your function by comparing your result with the on obtained by matlab function polyfit
0%.)2-72(Zg2) (2x) (2xyi)-(2x) 2 Q y.) (2x) 2-72(2x2) i) _n a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
