Cody

Solution 1585691

Submitted on 17 Jul 2018 by J. S. Kowontan
  • Size: 19
  • This is the leading solution.
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
A = cat(3, [2 8; 0 5], [1 3; 7 9]) x_correct = cat(3, [1 1; 2 2], [1 1; 2 2]) y_correct = cat(3, [1 2; 1 2], [1 2; 1 2]) z_correct = cat(3, [1 1; 1 1], [2 2; 2 2]) [x,y,z]=FindIndex(A); assert(isequal(x,x_correct)&&isequal(y,y_correct)&&isequal(z,z_correct));

A(:,:,1) = 2 8 0 5 A(:,:,2) = 1 3 7 9 x_correct(:,:,1) = 1 1 2 2 x_correct(:,:,2) = 1 1 2 2 y_correct(:,:,1) = 1 2 1 2 y_correct(:,:,2) = 1 2 1 2 z_correct(:,:,1) = 1 1 1 1 z_correct(:,:,2) = 2 2 2 2