dooh ... the solution is in test suite
>.
yeah, but it's a long one
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = magic(4);
y_correct = sum(diag(x));
assert(isequal(your_fcn_name(x),y_correct))
|
2 | Pass |
%%
x = ones(5);
y_correct = sum(diag(x));
assert(isequal(your_fcn_name(x),y_correct))
|
5833 Solvers
Make a run-length companion vector
512 Solvers
246 Solvers
324 Solvers
556 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!