This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
A = 60;
h = 5;
y_correct = [0.3752 0.3752 0.6927];
tolerance = 1e-4;
y = theSineOfAnglesOfATriangle(A,h);
assert(abs(y(1)-y_correct(1))<tolerance)
assert(abs(y(2)-y_correct(2))<tolerance)
assert(abs(y(3)-y_correct(3))<tolerance)
ans =
0.3846
|
2 | Fail |
A = 12;
h = 4;
y_correct = [0.7174 0.7174 0.8608];
tolerance = 1e-4;
y = theSineOfAnglesOfATriangle(A,h);
assert(abs(y(1)-y_correct(1))<tolerance)
assert(abs(y(2)-y_correct(2))<tolerance)
assert(abs(y(3)-y_correct(3))<tolerance)
ans =
0.8000
|
3 | Fail |
A = 120;
h = 8;
y_correct = [0.4534 0.4534 0.8001];
tolerance = 1e-4;
y = theSineOfAnglesOfATriangle(A,h);
assert(abs(y(1)-y_correct(1))<tolerance)
assert(abs(y(2)-y_correct(2))<tolerance)
assert(abs(y(3)-y_correct(3))<tolerance)
ans =
0.4706
|
4 | Fail |
A = 11;
h = 7;
y_correct = [0.8281 0.8281 0.3628];
tolerance = 1e-4;
y = theSineOfAnglesOfATriangle(A,h);
assert(abs(y(1)-y_correct(1))<tolerance)
assert(abs(y(2)-y_correct(2))<tolerance)
assert(abs(y(3)-y_correct(3))<tolerance)
ans =
0.9757
|
5 | Fail |
A = 10;
h = pi;
y_correct = [0.6461 0.6461 0.9197];
tolerance = 1e-4;
y = theSineOfAnglesOfATriangle(A,h);
assert(abs(y(1)-y_correct(1))<tolerance)
assert(abs(y(2)-y_correct(2))<tolerance)
assert(abs(y(3)-y_correct(3))<tolerance)
ans =
0.7025
|
6 | Fail |
A = 100;
h = 90;
y_correct = [0.8414 0.8414 0.0208];
tolerance = 1e-4;
y = theSineOfAnglesOfATriangle(A,h);
assert(abs(y(1)-y_correct(1))<tolerance)
assert(abs(y(2)-y_correct(2))<tolerance)
assert(abs(y(3)-y_correct(3))<tolerance)
ans =
0.9999
|
17209 Solvers
232 Solvers
Determine the number of odd integers in a vector
435 Solvers
302 Solvers
255 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!