This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 3;
b = 4;
c = 5;
y_correct = 2.4;
assert(abs(triangle_height(a, b, c) - y_correct) < 1e-4);
sides =
3 4 5
test =
0
|
2 | Pass |
a = 1;
b = 2;
c = 3;
y_correct = NaN;
assert(isequaln(triangle_height(a, b, c), y_correct));
sides =
1 2 3
test =
4
y =
NaN
|
3 | Pass |
a = 0;
b = 1;
c = 1;
y_correct = NaN;
assert(isequaln(triangle_height(a, b, c), y_correct));
sides =
0 1 1
test =
0
y =
NaN
|
4 | Pass |
a = -3;
b = -4;
c = -5;
y_correct = NaN;
assert(isequaln(triangle_height(a, b, c), y_correct));
sides =
-5 -4 -3
test =
-32
y =
NaN
|
The sum of the numbers in the vector
426 Solvers
511 Solvers
2144 Solvers
Number of Even Elements in Fibonacci Sequence
665 Solvers
569 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!