Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
dVar = [1:5 4:-1:1];
ref = diag(dVar);
user = MatrixFunc();
assert(isequal(user,ref))
bMat =
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
|
Program an exclusive OR operation with logical operators
639 Solvers
Make a run-length companion vector
512 Solvers
232 Solvers
452 Solvers
07 - Common functions and indexing 4
319 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!