Utility Functions

preparesimplex
% PREPARESIMPLEX calculates normals and lmi's for a simplex with an affine
% system and an input polytope defined.
%
% Usage: S=PREPARESIMPLEX(S)
%
% S is the simplex to be prepared
%
% Example:

 s=demosimplex();
 s=preparesimplex(s);

% See also MAKESIMPLEX and CLEANSIMPLEX
preparepolytope
% PREPAREPOLYTOPE calculates normals and lmi's for a polytope with an affine
% system and an input polytope defined.
%
% Usage: S=PREPAREPOLYTOPE(S)
%
% S is the polytope to be prepared
%
% Example:

 s=demosimplex();
 s=preparepolytope(s);

% See also PREPARESIMPLEX
cleansimplex
% CLEANSIMPLEX reduces the memory footprint of a simples by removeing
% unnecessary data. Notice that this marks the simplex as not prepared.
%
% Usage: S=CLEANSIMPLEX(S)
%
% S is the simplex to clean
%
% Example:

 s=demosimplex()
 s=preparesimplex(s)
 %Do operations on the simplex
 s=cleansimplex(s);
 save s;

% See also PREPARESIMPLEX
makesimplex
% MAKESIMPLEX constructs a simplex from a list of vertices
%
% Usage:
%   S.DIM=N
%   S.VERTICES={V1,V2,V3};
%   S=MAKESIMPLEX(S)
%
% S.DIM is the dimension of the simplex
% VI is the I'th vertex of the simplex
%
% Notice that facet I will be defined by S.VERTICES/VI.
%
% Example:

 s.dim=2
 s.vertices={[0;0],[1;1],[1;0]}
 s=makesimplex(s);

% See also PREPARESIMPLEX, DEMOSIMPLEX