Cody

Solution 1038073

Submitted on 30 Oct 2016 by Olha Remesh
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
n=5; x1=1; x2=2; x3=3; x4=4; y_correct = [eye(5) 2*ones(5); 3*ones(5) 4*eye(5)]; assert(isequal(CreateMatrix(n,x1,x2,x3,x4),y_correct))

2   Pass
n=2; x1=5; x2=2; x3=3; x4=-4; y_correct = [5*eye(2) 2*ones(2); 3*ones(2) -4*eye(2)]; assert(isequal(CreateMatrix(n,x1,x2,x3,x4),y_correct))