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
|
2183 Solvers
312 Solvers
329 Solvers
Return the first and last character of a string
3447 Solvers
Solving Quadratic Equations (Version 1)
427 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!