To produce and plot simulated data points that will be nearly on the line y = . 7 x + 2 . 1, use the MATLAB commands Then A=[x,x.∧0], b=y will prepare you to perform the leastsquares, line-fitting...

To produce and plot simulated data points that will be nearly on the line
y
=
.7x
+ 2.1, use the MATLAB commands

Then A=[x,x.∧0], b=y will prepare you to perform the leastsquares, line-fitting calculation.


a. Enter all these commands and recover the least-squares line. Is it exactly the line
y
=
.7x
+ 2.1? Is it close? Perform this experiment several times and summarize your results.


b. What is the effect of the number
.3 in these commands? If
.3 is replaced by 3, is the line that you recover usually more or less similar to
y
=
.7x
+ 2.1? Explain why your observation is reasonable.


c. What is the effect of using fewer or more data points on the recovery of the line? For instance, if the number 10 in these commands is replaced with 3 or 30, is the line you recover usually more or less similar to
y
=
.7x
+ 2.1? Explain why your observation is reasonable.




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here