Scipy Exercises
- Exercise 10.1: Least squares Generate matrix A ∈ Rm×n with m > n. Also generate some vector b ∈ Rm. Now find x = argmin||Ax−b||2. Print the norm of the residual.
1 | from scipy.optimize import leastsq |
- Exercise 10.2: Optimization Find the maximum of the function f(x) = sin^2(x-2)e^{-x^2}
1 | import math |