w1 = [1 2; 3 4;2 44; 5 23;24 2; 2 2];
p = [1 2 3 4 5 6 7 8 9;8 3 4 2 1 45 23 2 4]';
mx = [4 2 3];
%cl = [1 1 1 1 2 2 3 3 3];
len = 3;
[mship,d] = member(w1, p, mx, len)