"Mahshid" wrote in message <jnmm4i$3o7$
1...@newscl01ah.mathworks.com>...
> Hello,
> I am writing a GUI for a simplex problem and I want to draw the feasible region polyhedron by just providing matlab with the vertices. Is that feasible?
>
> Thanks.
no, it's not possible, but what IS possible is to draw the polyhedron by giving matlab the vertices and info on how to connect them. like so:
verts = [1 0 0; -1 0 0; 0 1 0;0 0 1];
faces = [1 2 4;1 3 4; 2 3 4;1 2 3];
h = patch('Faces',faces,'Vertices',verts,'FaceColor','b','EdgeColor','w')
that code creates a tetrahedron from (x,y,z) vertices p1(1,0,0), p2(-1,0,0), p3(0,1,0), p4(0,0,1), in that order, and faces defined by the polygons p1,p2,p4; p1,p3,p4;... etc
http://www.mathworks.com/help/techdoc/ref/patch.html