I am looking for a way to type a math expression into a string parameter, then evaluate it in the function. Specifically I am working on writing a Monte Carlo numerical integrator for a project I am doing that needs some integrals, but I am wanting to be able to use it for any expression. I want to be able to pass it the expression and bounds to evaluate, but I am unsure of how to actually make it evaluate the string as anything but. The old chrsraw() expression function did what I needed it to on an old project, but I am aiming to do this purely with VEX.
This will eventually turn into a random variable node with more control over the distributions, but I need the gamma function for several of them, which requires an integral calculation, as do several others.
edit: I meant vex.
evaluating a string as an expression (x-post odforce)
1372 0 1- Adam F
- Member
- 51 posts
- Joined: April 2011
- Offline
-
- Quick Links