 |
Creating arbitrary function with expression builder
Source code name: "func_exp1.py"
Programming language: Python
Topic: Function/1D
DMelt Version 1. Last modified: 12/11/2015. License: Pro
https://datamelt.org/code/cache/func_exp1_5222.py
To run this script using the DMelt IDE,
copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.
from java.awt import*
from jhplot import *
from jhplot.math.exp4j import *
e=ExpressionBuilder("3 * sin(x) - 2 / (x - 2)")
e.variables("x")
f=e.build()
ff=F1D("Test",f,10,100)
print ff.eval(10);
c1 = HPlot()
c1.visible(1)
c1.setAutoRange()
c1.draw(ff)
You see the box below because you did not login.