image thumbnail
from 2D polygon interior detection by Bruno Luong
Detect a whereas a point is interior or exterior to a 2D polygon

insidepoly_install
function insidepoly_install
% function insidepoly_install
% Installation by building the C-mex files for insidepoly
%
% Author Bruno Luong <brunoluong@yahoo.com>
% Last update: 04-Jun-2010

arch=computer('arch');
mexopts = {'-O' '-v' ['-' arch]};
% 64-bit platform
if ~isempty(strfind(computer(),'64'))
    mexopts(end+1) = {'-largeArrayDims'};
end

% invoke MEX compilation tool
mex(mexopts{:},'insidepoly_dblengine.c');
mex(mexopts{:},'insidepoly_sglengine.c');

Contact us at files@mathworks.com