No BSD License
function y = insertion(x) n = length(x); y = []; x = x(:).'; for e = x i = find(e<y); if isempty(i) y = [ y ; e]; else y = [y(1:i(1)-1); e; y(i(1):length(y))]; end; end;
Contact us at files@mathworks.com