Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
dVar = [1:5 4:-1:1];
ref = diag(dVar);
user = MatrixFunc();
assert(isequal(user,ref))
ans =
1 0 0 0 0 0 0 0 0
0 2 0 0 0 0 0 0 0
0 0 3 0 0 0 0 0 0
0 0 0 4 0 0 0 0 0
0 0 0 0 5 0 0 0 0
0 0 0 0 0 4 0 0 0
0 0 0 0 0 0 3 0 0
0 0 0 0 0 0 0 2 0
0 0 0 0 0 0 0 0 1
|
Find the longest sequence of 1's in a binary sequence.
2441 Solvers
Renaming a field in a structure array
542 Solvers
Back to basics 18 - justification
150 Solvers
193 Solvers
304 Solvers