Cody

Solution 2065651

Submitted on 21 Dec 2019 by Martin C.
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
x = 1; y=1; z=1; y_correct = eye(3); assert(isequal(mat_bl(x,y,z),y_correct))

B = 1 0 0 0 1 0 0 0 1

2   Pass
x = 2; y=2; z=2; y_correct = [2 2 0 0 0 0; 2 2 0 0 0 0; 0 0 2 2 0 0; 0 0 2 2 0 0; 0 0 0 0 2 2; 0 0 0 0 2 2] assert(isequal(mat_bl(x,y,z),y_correct))

y_correct = 2 2 0 0 0 0 2 2 0 0 0 0 0 0 2 2 0 0 0 0 2 2 0 0 0 0 0 0 2 2 0 0 0 0 2 2 B = 2 2 0 0 0 0 2 2 0 0 0 0 0 0 2 2 0 0 0 0 2 2 0 0 0 0 0 0 2 2 0 0 0 0 2 2

3   Pass
x = 4; y=1; z=3; y_correct = [4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 3 3 3 0 0 0 0 0 3 3 3 0 0 0 0 0 3 3 3] assert(isequal(mat_bl(x,y,z),y_correct))

y_correct = 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 3 3 3 0 0 0 0 0 3 3 3 0 0 0 0 0 3 3 3 B = 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 4 4 4 4 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 3 3 3 0 0 0 0 0 3 3 3 0 0 0 0 0 3 3 3

Suggested Problems

More from this Author124