Cody

Solution 1585550

Submitted on 17 Jul 2018 by bainhome
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
M=ones(3,3,3); M(2,:,:)=2.*M(2,:,:); M(3,:,:)=3.*M(3,:,:); ord = [3,2,1]; MC = ones(3,3,3); MC(:,:,2)=2.*MC(:,:,2); MC(:,:,3)=3.*MC(:,:,3); assert(isequal(transform(M,ord),MC))

2   Pass
M=rand(1,2,3,4,5,6); ord = [6 1 5 2 4 3]; assert(isequal(size(transform(M,ord)),ord))