## Distance of a point to an Ellipsoid

I am working on a Matlab sim and I need to find the shorted distance of a point to an Elliposid surface.

The point is defined as [X,Y,Z].
Elliposid center is defined as [Xc,Yc,Zc]

Ellipsoid is defined as
A B C
E F G
H I J

(I dont if thats sufficient information for ellipsoid, assuming its having standard equation.)
 PhysOrg.com science news on PhysOrg.com >> Galaxies fed by funnels of fuel>> The better to see you with: Scientists build record-setting metamaterial flat lens>> Google eyes emerging markets networks
 Recognitions: Gold Member Science Advisor Staff Emeritus I really don't know what you mean by saying the ellipsoid is "given" by that array of letters but if you have an equation for the ellipsoid the most direct thing to do is write the equation for the line between the given point and the center of the ellipsoid. Put the parametric equations for the line, in terms of the parameter, t, say, into the equation of the ellipse to get a single quadratic equation for t. Put that t into the parametric equations to find the point. That quadratic equation will have two solutions. One gives the point on the ellipsoid closest to the given point, the other the point farthest away.