Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plot a function
#1
I want to plot a function in a interval. I'm trying to do it - but I'm stuck. someone who can help?

The answer I get on the y axis also looks strange

def f(x):
    return x**5+x**3+x
n=100    
xlist = [i*n for i in range(-1,1,100)]
ylist = [f(x) for x in (xlist)]
print(xlist,ylist)

outpot: [-100] [-10001000100] 
Reply


Messages In This Thread
Plot a function - by dxfrelince - May-21-2019, 09:38 AM
RE: Plot a function - by DeaD_EyE - May-21-2019, 09:48 AM
RE: Plot a function - by dxfrelince - May-21-2019, 10:42 AM
RE: Plot a function - by DeaD_EyE - May-21-2019, 12:23 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020