Skip to content

Latest commit

 

History

History
47 lines (44 loc) · 2.88 KB

File metadata and controls

47 lines (44 loc) · 2.88 KB

Introduction to Numerical Analysis

Course Introduction to Numerical Analysis at NTU.
All codes are using Python36.

Lecture

  • Lecture201 -Approximation errors and Roundoff errors
    practice1 : Calculating pi with Liu Hui method.
    practice2 : Calculating pi with Riemann zeta function.
  • Lecture202 -Numerical differential and integration
    practice1 : Integral with Simpson 3/8 method.
    practice2 : Difference between different interval using scipy.integrate.
  • Lecture203 -Numpy array and matplotlib.
    practice1 : Some basic array operation.
    practice2 : Using matplotlib.pyplot to plot functions.
  • Lecture204 -Linear algebra and matplotlib image processing.
    practice1 : Use np.linalg.inv and np.linalg.det to verfiy some properties.
    practice2 : Use plt.imread to read and process image, plt.imshow and plt.show to show image.
  • Lecture205 -Root finding, curve fitting, and minimization.
    practice1 : Use scipy.optimize.newton to find root by Newton's method, and build arcsin, arccos functions.
    practice2 : Use np.polyfit to fit, plt.errorbar to plot data with error.

Assignment

  • Assignment1
    1-1 : Simply numerical differential using scipy.misc.
    1-2 : Simply numerical integration using scipy.integrate.
    1-3 : Convolution, Breit-Wigner distribution, Gaussian distribution using scipy.integrate.
  • Assignment2
    2-1 : Array operation using np.fromfunction.
    2-2 : Array operation using np.fromfunction.
    2-3 : Use np.array to play Game of Life.
  • Assignment3
    3-1 : Use scipy.linalg.solve to solve equation.
    3-2 : Use np.diag,np.sqrt to compute covariance matrix into correlation matrix.
    3-3 : Computing least square. Code involved np.linspace, np.dot, np.transpose.
  • Assignment4
    4-1 : Use scipy.optimize.newton to find root by Newton's method.
    4-2 : Use scipy.optimize.minimize to fit data with error range by calculating X^2.
    4-3 : Use np.hstack, plt.hist to build histograms. Then try to maximize a given function by scipy.optimize.minimize.
  • Assignment5
    5-1 : Use scipy.integrate.solve_ivp to solve position, velocity, acceleration, with resistance force ODE.
    5-2 : Use scipy.integrate.solve_ivp to solve ODE a multi-star system in 2D.
    5-3 : Use scipy.integrate.solve_ivp to solve ODE charged particle moving in magnetic field and electric field.
  • Assignment6
    6-1 : Use np.random.rand to generate random number within the target function distribution.
    6-2 : Use np.random.rand to generate a unit circle's chord.
    6-3 : Use np.random.rand to generate smeared exponential decay Gaussian distribution function.