【问题标题】:Solving and Plot Equation in Python在 Python 中求解和绘制方程
【发布时间】:2015-01-29 23:20:03
【问题描述】:

我对python有点陌生。我要做的就是求解 y 并绘制函数, 换句话说,插入 x 的值并生成 y。

y^10+y = x.

请原谅我的无知。

【问题讨论】:

    标签: equations


    【解决方案1】:
    from numpy import *
    from matplotlib.pyplot import plot, show
    
    y = arange(-10, 10, 0.01) #get values between -10 and 10 with 0.01 step and set to y
    x = y**10 + y #get x values from y
    
    plot(x, y)
    show()
    

    使用 matplotlib 和 numpy 库:http://scipy.org/

    如果你想解决问题,请使用 sympy:https://github.com/sympy/sympy/wiki/Quick-examples

    【讨论】:

      猜你喜欢
      • 2022-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-26
      • 1970-01-01
      • 2019-11-20
      • 2014-12-22
      • 1970-01-01
      相关资源
      最近更新 更多