Subsection 4.1.1 Fitting the best line
¶A classic problem is to fit the "best" line through a given set of points: Given
we wish to fit the line \(f( \chi ) = \gamma_0 + \gamma_1 \chi \) to these points, meaning that the coefficients \(\gamma_0 \) and \(\gamma_1 \) are to be determined. Now, in the end we want to formulate this as approximately solving \(A x = b \) and for that reason, we change the labels we use: Starting with points
we wish to fit the line \(f( \alpha ) = \chi_0 + \chi_1 \alpha \) through these points so that
which we can instead write as
where
Homework 4.1.1.1.
Use the script in Assignments/Week04/matlab/LineFittingExercise.m
to fit a line to the given data by guessing the coefficients \(\chi_0\) and \(\chi_1 \text{.}\)
Ponder This 4.1.1.2.
Rewrite the script for Homework 4.1.1.1 to be a bit more engaging...)