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
Post a Comment