MatLab accumarray unexpectedly changing ordering
The documentation of accumarray says: Note If the subscripts in subs are not sorted, fun should not depend on the order of the values in its input data. And your subs is not sorted (at least not in ascending order). If you rewrite the code so that subs is sorted and vals is also rearranged … Read more