cases = {[6 8; 1 10; 6 6; 5 9; 8 10]; [3 8; 7 5; 6 9; 7 8; 5 1]; [4 8; 1 9; 9 9; 10 2; 1 6]}; % Test case to run testcase = 3; I = cases{testcase}; for k=~eye(5);if nnz(convhull(I(k,1),I(k,2)))>4;I(k,:),end;end