Cody

Solution 1680108

Submitted on 25 Nov 2018 by William
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
x1 = [ 1 2 3 ]; x2 = [ 10 20 ]; y_correct = [11 21; 12 22; 13 23]; assert(isequal(gridit(@sum, x1, x2), y_correct));

2   Pass
x1 = [ 1 2 3 ]; x2 = [ 10 20 ]; x3 = [ 0 100 ]; y_correct(:,:,1) = [11 21; 12 22; 13 23]; y_correct(:,:,2) = y_correct(:,:,1) + 100; assert(isequal(gridit(@sum, x1, x2, x3), y_correct));

3   Pass
assert(isequal(gridit(@sum, 2,3),5));