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
|
Create a Multiplication table matrix...
283 Solvers
400 Solvers
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
298 Solvers
277 Solvers
Matlab Basics - Create a row vector
277 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!