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))
|
Flip the main diagonal of a matrix
506 Solvers
Getting the absolute index from a matrix
211 Solvers
321 Solvers
323 Solvers
Flip the vector from right to left
2670 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!