From: michael on 13 Aug 2010 10:56 i wanna find the cross points of 2 circles, but as a result i get complex number need some help X,Y are center coordinates vector (X for x position, Y for y position), R is a radius vector function [x,y]=INTERSECT (X,Y,R) syms x y x_center y_center r eq=(x-x_center)^2+(y-y_center)^2-r^2; x_center=X(1); y_center=Y(1); r=R(1); eq1=subs(eq); x_center=X(2); y_center=Y(2); r=R(1); eq2=subs(eq); [x,y]=solve(eq1,eq2);
From: Torsten Hennig on 13 Aug 2010 07:16 > i wanna find the cross points of 2 circles, but as a > result i get complex number > > need some help > > X,Y are center coordinates vector (X for x position, > Y for y position), R is a radius vector > > function [x,y]=INTERSECT (X,Y,R) > > syms x y x_center y_center r > eq=(x-x_center)^2+(y-y_center)^2-r^2; > x_center=X(1); > y_center=Y(1); > r=R(1); > eq1=subs(eq); > > x_center=X(2); > y_center=Y(2); > r=R(1); Maybe you mean r=R(2) here ? > eq2=subs(eq); > > [x,y]=solve(eq1,eq2); If the two circles do not cross, you will get complex solutions for x and y. Best wishes Torsten.
|
Pages: 1 Prev: FIR filter cutoff Next: mxCreateInteger4Matrix, mxCreateReal4Matrix? |