Cody

Solution 2050021

Submitted on 7 Dec 2019 by William
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
x=[1,2,3;0,4,5;1,0,6]; y_correct = [24 5 -4 -12 3 2 -2 -5 4] assert(isequal(cofactor_mat(x),y_correct))

y_correct = 24 5 -4 -12 3 2 -2 -5 4

2   Pass
x=[1,7;2,0] y_correct=[0 -2 -7 1] assert(isequal(cofactor_mat(x),y_correct))

x = 1 7 2 0 y_correct = 0 -2 -7 1

3   Pass
x=zeros(5) y_correct=zeros(5) assert(isequal(cofactor_mat(x),y_correct))

x = 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 y_correct = 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

4   Pass
x=[2,-3,5;6,0,4;1,5,-7] y_correct=[-20,46,30;4.000000000000001,-19,-13;-12,22,18] assert(isequal(cofactor_mat(x),y_correct))

x = 2 -3 5 6 0 4 1 5 -7 y_correct = -20.0000 46.0000 30.0000 4.0000 -19.0000 -13.0000 -12.0000 22.0000 18.0000