Converting Matlab max to findmax

The difference here isn’t in findmax, it’s in the indexing expression. To match Matlab, use X[1:1,:,:,:,:] to keep everything as 5-dimensional or just work with it on dimension 4.

Julia drops all dimensions indexed by scalars, whereas Matlab preserves them (either implicitly or explicitly).

4 Likes