Polyhedron function for detecting if points are vertices
Show older comments
Hello i have to detect if a point is a vertex of my polyhedron. Here is what i have for now:
function [ ] = vertexdetect (A,b,x)
%detecting the dimensions of A,b and x
if (size(x,1)~=size(A,2))
error('The dimensions of A and x don't fit')
elseif (size(b,1)~=size(A,1)
error('The dimensions of A and b don't fit')
end
if(size(A,1)<size(A,2))
disp('x is not a vertex, A has less rows than columns')
First I have to detect if x is element of my polyhedron P and secondly if x is a vertex of P. I just dont know how to detect this on P.
Can anyone help me?
Thank you in advance.
PS: the polyhedron is defined as an intersection of a finite set of closed halfspaces, P:={x in R^n | Ax<=b}
Answers (1)
CommunityGast
on 16 Jan 2018
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!