Cody

Solution 1980343

Submitted on 17 Oct 2019
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   Fail
x = magic(4); y_correct = sum(diag(x)); assert(isequal(your_fcn_name(x),y_correct))

x = 0.1041 0.8200 0.5203 0.7518 0.3080 0.4120 0.6867 0.5085 0.9624

Assertion failed.

2   Fail
x = ones(5); y_correct = sum(diag(x)); assert(isequal(your_fcn_name(x),y_correct))

x = 0.8226 0.4937 0.4941 0.3286 0.6077 0.4681 0.4331 0.0699 0.2741

Assertion failed.

Suggested Problems

More from this Author1