I want to solve two equations with two unknown variables I have two equations (-x)*(x1 – x) + (r – y)*(y1 – y) = 0, (x1 – x)^2 + (y1 – y)^2 = z^2, where, x1,y1,r and z are known values. The values can be used as the inputs to the program.
what I tried is,
syms x yeqns = [x^2 +y^2 - x*point_x - y*point_y + r*point_y - r*y == 0 ,... (point_x - x)^2 + (point_y - y)^2 == length_tang^2];vars = [x y];[a,b] = solve(eqns,vars);
but it takes too much time and then gives no values.
Best Answer
Too slow? It came back virtually instantaneously.
0.2 seconds is too slow?
Note that it is probably possible for SOME sets of inputs, there is no real valued solution at all.