MATLAB Answers

Info

This question is closed. Reopen it to edit or answer.

solving two equations (cone and sphere intersection)

1 view (last 30 days)
MatG
MatG on 12 Aug 2015
Closed: Walter Roberson on 12 Aug 2015
I am trying to solve the intersection of a sphere centered at (-10,-10,-10) with radius 50 and a cone with apex (0,0,0) and base radius 2. The equations and figure are in (<http://mathworld.wolfram.com/Cone-SphereIntersection.html)>. The code I wrote:
a= -10; b=-10; d=-10; c = 2; r= 50; syms x y z [Sx,Sy,Sz] = solve( [(x-a)^2 + (y-b)^2+(z-d)^2 == (r^2), x^2+y^2 - (c^2)*z^2 == 0],[x,y,z]);
The output is:
??? Error using ==> char Conversion to char from logical is not possible.
Error in ==> solve>getEqns at 165 vc = char(v);
Error in ==> solve at 67 [eqns,vars] = getEqns(varargin{:});
Error in ==> Quadric at 9 [Sx,Sy,Sz] = solve( [(x-a)^2 + (y-b)^2+(z-d)^2 == (r^2), x^2+y^2 - (c^2)*z^2 == 0],[x,y,z]);
Can any one help with this?

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!