MATLAB: Solve 2 quadratic equations

quadratic

I have 2 quadratic equations with 2 known and 2 unknown. Ho do I write a script file to solve this equation. The equations are: (x1-xc)^2+(y1-yc)^2=R^2 (x2-xc)^2+(y2-yc)^2=R^2 I know the values for x1,x2,y1,y2 and R, these can be input manually in the script. I need to find xc and yc. How do I write a code to solve it in Matlab. Any help would be greatly appreciated.

Best Answer

syms xc;
syms yc;
[x y] = solve('(x1-xc)^2+(y1-yc)^2=R^2 ,(x2-xc)^2+(y2-yc)^2=R^2')
put the values of R ,x1 and y1 in above equation you will get your answer hopefully