fork download
  1. >> A = randi(10,1e4,5);
  2. >> timeit(@() accumarrayStable(A(:,1:end-1),A(:,end), [], @(x) x(end)))
  3. ans =
  4. 0.0662
  5. >> timeit(@() accumarrayStable2(A(:,1:end-1),A(:,end), [], @(x) x(end)))
  6. ans =
  7. 0.0600
Success #stdin #stdout #stderr 0.17s 65048KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
parse error:

  syntax error

>>> >> A = randi(10,1e4,5);
     ^