fork download
  1. f = @(v) reshape([v(mod(v, 2) == 0); sort(v(mod(v, 2) == 1))], 1, []);
  2. f([6 5 4 3 2 1])
Success #stdin #stdout 0.06s 45624KB
stdin
Standard input is empty
stdout
ans =

   6   1   4   3   2   5