Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
aMat = ones(9,9)*2;
bMat = diag([1:5 4:-1:1]);
cMat = reshape(1:100,10,10);
zRef = det(cMat)*(aMat*bMat)'
zMat = MyFunc();
assert(isequal(zRef,zMat))
zRef =
1.0e-114 *
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
zMat =
1.0e-114 *
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
|
2 | Pass |
Ref = ones(9,9)*2;
[zMat Mat] = MyFunc();
assert(isequal(Ref,Mat))
zMat =
1.0e-114 *
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
|
3 | Pass |
Ref = diag([1:5 4:-1:1]);
[zMat a Mat] = MyFunc();
assert(isequal(Ref,Mat))
zMat =
1.0e-114 *
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
|
4 | Pass |
Ref = reshape(1:100,10,10);
[zMat a b Mat] = MyFunc();
assert(isequal(Ref,Mat))
zMat =
1.0e-114 *
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621 0.1621
0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297 0.1297
0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973 0.0973
0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648 0.0648
0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324 0.0324
|
469 Solvers
179 Solvers
Find out value of sine given by degree.
173 Solvers
Matlab Basics - Logical Tests I
139 Solvers
Calculate square and cube of number
169 Solvers