cmss Listing 2

N = 30;

x = [randn (3,N) .* ([1,3,6]'*ones(1,N)), [5 5;-1 1;0 0]];

select_3D_points (x)

The first two commands create a variable xx that holds 32 3D points, 30 of which are randomly distributed and two, with coordinates \( \left[ 5,\, \pm 1,\, 0\right] \), which are ``outliers'' . The last command launches FreeWRL in such a way that it is not only possible to examine the 3D points, represented by boxes, but also select a subset of them, by clicking on them : a selected box is bright green instead of blue. On the snapshot in Figure 1 (right), the two outliers have been selected.

Having selected these points, let's go back to the Octave window, where select_3D_points() has produced the output :

Menu: (R)estart browser. Other key : done
select_3D_points() is now waiting for a key to be hit, either 'r' , in which case FreeWRL will be restarted, or any other key, in which case select_3D_points() finishes and returns the indices of the 3D points that have been output, in the form of a 0-1 matrix :

ans = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1.

Søren Hauberg 2009-06-07