www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conellipsoid/getDistanceMatrix.m

    function W = getDistanceMatrix(con)
%GETDISTANCEMATRIX Get the distance matrix of an ellipsoid constraint
%
%  W = GETDISTANCEMATRIX(CON) is the matrix that, along with the center,
%  defines the ellipsoid constraint.
%
%  The distance matrix, W, is so-called because it used to generate the
%  "distance" that a given point, x, is from the surface of the ellipsoid,
%  specifically,
%
%              distance( x ) = (x-xc)' * W * (x-xc) - 1 .
%
%  To compute the constraint distance, use the CONSTRAINTDISTANCE method as
%  this has better scaling properties.
%
%  See also CONELLIPSOID, 
%           CONELLIPSOID/GETCENTER, 
%           CONELLIPSOID/SETDISTANCEMATRIX,
%           CONELLIPSOID/CONSTRAINTDISTANCE.

%  Copyright 2005-2008 The MathWorks, Inc.

W = con.W;

%------------------------------------------------------------------------------|
% EOF
%------------------------------------------------------------------------------|