I just wrote the usual math quiz. Nothing to it as per normal. A few basic matrix operations first (addition, subtraction, scalar multiplication, matrix multiplication). Then solve by inversion, and a fit the data points.