Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hello
If I have a formula, can I get a coefficient for every one of the variables?
For example, if I set F1 = 0. F2 = 1, I will get the coefficient of F1 (=10)
Is there a better way to get coefficients from every one of the variables (F1, F2, F3)?

ExprEvaluator util = new ExprEvaluator();
util.defineVariable("F1", 0);
util.defineVariable("F2", 1);
util.defineVariable("F3", 0);
IExpr exp2 = util.evaluate("F1+10*F2+15*F3").evalDouble();//10

thank you

You must be logged in to vote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.