function U=sceltabis(Y) % given an array of columns Y, the program gives a matrix U whose rows are obtained by taking an element a1 from Y(1), then an element from Y(2) different form a1 and so on U=cell2mat(Y(1,1)); for i=2:size(Y,2) U=scelta(U,cell2mat(Y(1,i))); end