Code covered by the BSD License  

Highlights from
Linearity of Points

from Linearity of Points by Chao Huang
Determine the linearity of points, like coinear, coplanar, and so on.

linearity(p)
function r = linearity(p)
% each row is a point
% r ==1 is colinear, r == 2 is coplanar, and so on.
r = rank(bsxfun(@minus,p(1,:),p));

Contact us