from java.lang import Math
from jhplot import *
class MyFunc(FNon):
def value(self, x):
y=x[0]*x[0]*Math.sqrt(x[0])
if (x[0]<3): y=0
return y
c1 = HPlot() # plot data and the fit function
c1.visible(); c1.setAutoRange()
pl = MyFunc("Title",1,0) # assume 1 variable, 0 parameters
f1=F1D(pl,0,10) # convert to plottable function (0-10)
c1.draw(f1)
Ads help maintain this website.