A more efficient StringFunction (1)

  • Ideas: hold parameters in a dictionary, set the independent variable into this dictionary, run eval with this dictionary as local namespace

  • Usage:
    f = StringFunction_v4('1+A*sin(w*t)', A=0.1, w=3.14159)
    f.set_parameters(A=2)   # can be done later
    

    previousnexttable of contents