Cody

Solution 1876340

Submitted on 17 Jul 2019 by Gregory Bond
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
s = [1 1 2 2 3 3 4 5 5 6 7 8]; t = [2 4 4 8 4 6 8 6 8 7 8 8]; y_correct = [0 1 0 1 0 0 0 0 ; 1 0 0 1 0 0 0 1 ; 0 0 0 1 0 1 0 0 ; 1 1 1 0 0 0 0 1 ; 0 0 0 0 0 1 0 1 ; 0 0 1 0 1 0 1 0 ; 0 0 0 0 0 1 0 1 ; 0 1 0 1 1 0 1 1] assert(isequal(getMatrix(s,t),y_correct))

y_correct = 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 1 0 1 1 A = []

2   Pass
s = [1 ]; t = [8 ]; y_correct = [ 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 0 0 ] assert(isequal(getMatrix(s,t),y_correct))

y_correct = 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 A = []