Cody

# Problem 528. Find the largest value in the 3D matrix

Solution 1085829

Submitted on 20 Dec 2016 by Benjamin Re
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 = 1:9; A=reshape(A,[3 1 3]); y_correct = 9; assert(isequal(islargest(A),y_correct))

n = 9 A = 1 A = 1 2 A = 1 2 3 A = 1 2 3 4 A = 1 2 3 4 5 A = 1 2 3 4 5 6 A = 1 2 3 4 5 6 7 A = 1 2 3 4 5 6 7 8 A = 1 2 3 4 5 6 7 8 9 y = 9

2   Pass
A = 9:17; A=reshape(A,[3 1 3]); y_correct = 17; assert(isequal(islargest(A),y_correct))

n = 9 A = 9 A = 9 10 A = 9 10 11 A = 9 10 11 12 A = 9 10 11 12 13 A = 9 10 11 12 13 14 A = 9 10 11 12 13 14 15 A = 9 10 11 12 13 14 15 16 A = 9 10 11 12 13 14 15 16 17 y = 17

3   Pass
A = []; A(:,:,1) = magic(5); A(:,:,1) = eye(5); A(:,:,1) = 40*ones(5); y_correct = 40; assert(isequal(islargest(A),y_correct))

n = 25 A = 40 A = 40 40 A = 40 40 40 A = 40 40 40 40 A = 40 40 40 40 40 A = 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 A = 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Column 17 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 18 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 19 40 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 20 40 40 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 21 40 40 40 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 22 40 40 40 40 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 23 40 40 40 40 40 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 24 40 40 40 40 40 40 40 40 A = Columns 1 through 16 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 Columns 17 through 25 40 40 40 40 40 40 40 40 40 y = 40

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!