Cody

Solution 1187636

Submitted on 13 May 2017 by shahriar memaran
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
m = magic(5); n = ones(2,3); o = [2 3]; y_correct = [7,14,16;13,20,22]; assert(isequal(cookiecutter(m,n,o),y_correct))

2   Pass
m = 1; n = 8; o = [1 1]; y_correct = 8; assert(isequal(cookiecutter(m,n,o),y_correct))

3   Pass
m = magic(20); n = ones(3); o = [17 17]; y_correct = [64,338,339;357,43,42;377,23,22]; assert(isequal(cookiecutter(m,n,o),y_correct))

4   Pass
m = magic(20); n = 5.*ones(2,3); o = [4 10]; y_correct = [350,355,1645;450,455,1545]; assert(isequal(cookiecutter(m,n,o),y_correct))

5   Pass
m = magic(7); m=m(:,1:end-1); n = spiral(3); o = [5 4]; y_correct = [231,336,396;246,43,6;245,8,33]; assert(isequal(cookiecutter(m,n,o),y_correct))