c# - How do I use Ncalc.Expression to solve for y? -


i want input string:

"pow(y,2) = 4 - pow(x,2)" (in other words, y^2=4-x^2)

and make "x" = 1, have evaluate , give me value of y. how do this?

so want solve equation y given number x? means 'y' function of x, so:

var y = new expression("sqrt(4 - pow(x, 2))"); // y = sqrt(4 - x^2) e.parameters["x"] = 1;  var x = y.evaluate(); 

wouldn't solve problem? (other square root of plus/minus something, you'd hav add logic)


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -