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
|
given 3 sides, find area of this triangle
680 Solvers
725 Solvers
401 Solvers
Area of an equilateral triangle
2763 Solvers
486 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!