"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <k5tkin$58m$1@newscl01ah.mathworks.com>...
> "Xu " <mimiga123@hotmail.com> wrote in message <k5thfa$oie$1@newscl01ah.mathworks.com>...
> > For example, given x1=(1,2,3), x2=(3,4,5), x3=(2,3,1). Then, H=a1*x1+a2*x2+a3*x3 forms a convex hull, where a1+a2+a3=1, a1,a2,a3>=0. I want to find a point on this convex hull and that point is nearest to the origin. Of course, if the convex hull includes 0, the point is 0 itself.
> >
> > Do you guys have any hint for this. Or is there a Matlab toolbox or function for this? I know there are some algorithms such as Gilbert's Algorithm, but I really want a Matlab form . Thanks in advance.
>
> Rewrite your convexhull as linear constraint:
>
> A*X <= b, X in R^3 (C).
> You want to minimize |X|^2, such that (C).
>
> Use QUADPROG to solve this problem.
>
Thanks for your reply. But what is A and b is my case? I am still confused.
> Bruno
> "Xu " <mimiga123@hotmail.com> wrote in message <k5thfa$oie$1@newscl01ah.mathworks.com>...
> > For example, given x1=(1,2,3), x2=(3,4,5), x3=(2,3,1). Then, H=a1*x1+a2*x2+a3*x3 forms a convex hull, where a1+a2+a3=1, a1,a2,a3>=0. I want to find a point on this convex hull and that point is nearest to the origin. Of course, if the convex hull includes 0, the point is 0 itself.
> >
> > Do you guys have any hint for this. Or is there a Matlab toolbox or function for this? I know there are some algorithms such as Gilbert's Algorithm, but I really want a Matlab form . Thanks in advance.
>
> Rewrite your convexhull as linear constraint:
>
> A*X <= b, X in R^3 (C).
> You want to minimize |X|^2, such that (C).
>
> Use QUADPROG to solve this problem.
>
Thanks for your reply. But what is A and b is my case? I am still confused.
> Bruno