Cody

Solution 194306

Submitted on 21 Jan 2013 by Khaled Hamed
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));