Cody

Problem 43050. Maximum of ND-array

Solution 1052514

Submitted on 14 Nov 2016 by Binbin Qi
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
x = -11; y_correct = -11; assert(isequal(your_fcn_name(x),y_correct))

ans = -11

2   Pass
x = [-1 0 2]; y_correct = 2; assert(isequal(your_fcn_name(x),y_correct))

ans = 2

3   Pass
x = -ones(10); y_correct = -1; assert(isequal(your_fcn_name(x),y_correct))

ans = -1

4   Pass
x = rand(71,65,78,2); x(5,8,12,1)=100; y_correct = 100; assert(isequal(your_fcn_name(x),y_correct))

ans = 100

5   Pass
x = zeros(1,6,4,22,5,7); y_correct = 0; assert(isequal(your_fcn_name(x),y_correct))

ans = 0

6   Pass
x = magic(11); y_correct = 121; assert(isequal(your_fcn_name(x),y_correct))

ans = 121

7   Pass
x = -magic(12); y_correct = -1; assert(isequal(your_fcn_name(x),y_correct))

ans = -1

8   Pass
x = zeros(2,3,4,5); x(1,2,1,2) = 42; y_correct = 42; assert(isequal(your_fcn_name(x),y_correct))

ans = 42

Suggested Problems

More from this Author2

Community Treasure Hunt

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

Start Hunting!