import math._ def f(x:Double):Double={ // 3*x*x+x // or 3*math.pow(3,2)+x sin(x) } //> f: (x: Double)Double val (s, e, step)= (-10.0, 10.0, 0.1) val (sx, sy) = (10, 100) clear ; jumpTo(s*sx,f(s)*sy) for(x <- s to e by step) { //print(x) ; print("\t") ; println(f(x)) moveTo(x*sx,f(x)*sy) }