function res=permu_cartes(x) n=length(x); k=grand(1,1,'uin',1,n); if (k==1) then res=x; elseif (k==n) then res=[x(2:1:n), x(1)]; else res=[x(2:1:(k-1)), x(1), x(k:1:n)] end endfunction