On Friday, April 8, 2011 11:03:14 AM UTC-7, ObsessiveMathsFreak wrote: > > I have a python type function taking two variables is defined in such > a say that accidental evaluation is a possibility. Here is a > simplified version > > def h(x,n): > if x>2: > return n-x > else: > return n*x-2 > > How can functions like this be plotted over x for a constant value of > n in sage? >
sage: plot(lambda x: h(x,3), (x, 0, 4)) works for me. -- John -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org
