# The Nature of Mathematical Modelling

## 12.1

### Generate 100 points x uniformly distributed between 0 and 1, and let y = 2+3x+ζ, where ζ is a Gaussian random variable with a standard deviation of 0.5. Use an SVD to fit y = a + bx to this data set, finding a and b.

## 12.2

### Generate 100 points x uniformly distributed between 0 and 1, and let y = sin(2 + 3x) + ζ, where ζ is a Gaussian random variable with a standard deviation of 0.1. Write a Levenberg-Marquardt routine to fit y = sin(a+bx) to this data set starting from a = b = 1, and investigate the convergence for both fixed and adaptively adjusted λ values.