1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] how'd i plot this graph? [closed]

Discussão em 'Python' iniciado por Stack, Dezembro 19, 2024.

  1. Stack

    Stack Membro Participativo

    enter image description here i'd like to plot this graph of y but i'm getting overflow erroors so i think my balues are too small and/or too big so i'd like to solve this calculation limit in regular python please.

    import numpy as np
    from scipy import special as s
    import matplotlib.pyplot as plt
    from decimal import Decimal as dd
    import numpy as np
    from scipy.special import logsumexp as ll
    x = np.linspace(0,10,1)
    #x = np.array([1.0])
    q2 = 2**0.5
    q1 = (3/q2)*x+(39/q2)
    #print(q1)
    d = s.erfi(q1)
    d2 = (np.e)**(-4.5*x**2-117*x)
    d3 = np.e**(-1521/2)

    d4 = ll(np.e**(q1**2-1521/2))
    #d4 = pow(np.e,

    d5 = (np.pi)**0.5
    #let c = 0
    y = ll((d2*(((178113*d3*d5*d)/q2)-(27*x**2-351*x+4570)*d4))**(-1/18))
    plt.plot(x,y)

    plt.xlabel('$x$')
    plt.ylabel('$y$')
    plt.show()


    had some error with getting y

    Continue reading...

Compartilhe esta Página