Cody

Problem 45483. Where do the maximum number belongs within a 3-D matrix?

Solution 2977081

Submitted on 22 Sep 2020 by Benjamin
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; b=2; c_correct = 2; assert(isequal(ThreeDimMatrix2(a,b),c_correct)) a =ones(2,2); b=zeros(2,2); c_correct=[1;2;3;4]; assert(isequal(ThreeDimMatrix2(a,b),c_correct)) a=[1 2 3;4 5 6;7 8 9]; b=magic(3); c_correct=[9;15]; assert(isequal(ThreeDimMatrix2(a,b),c_correct)) a=[-3 0 -1 1;-6 -5 7 8;-4 0 0 1;3 4 5 6]; b=magic(4); c_correct=17; assert(isequal(ThreeDimMatrix2(a,b),c_correct))

Suggested Problems

More from this Author5

Community Treasure Hunt

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

Start Hunting!