Skip to content

Instantly share code, notes, and snippets.

View guanshaoheng's full-sized avatar
🏠
Working from home

shguan guanshaoheng

🏠
Working from home
View GitHub Profile
@guanshaoheng
guanshaoheng / newton_raphson.py
Created March 31, 2020 09:04
Newton-Raphson method for nonlinear functions
"""
(修正)牛顿拉夫逊迭代 求解非线性方程组
"""
import numpy as np
import sympy as sp
class NewtonRaphsonSolver:
def __init__(self, p, x, f, tolerance=0.001):