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 |
x = 1;
y_correct = 1/2;
assert(abs(square_area(x)-y_correct)<1e-4)
y =
0.5000
|
2 | Pass |
x = 2.828427;
y_correct = 4;
assert(abs(square_area(x)-y_correct)<1e-4)
y =
4.0000
|
3 | Pass |
x = 2;
y_correct = 2;
assert(abs(square_area(x)-y_correct)<1e-4)
y =
2.0000
|
4 | Pass |
x = 10;
y_correct = 50;
assert(abs(square_area(x)-y_correct)<1e-4)
y =
50.0000
|
5 | Pass |
x = 5;
y_correct = 12.5;
assert(abs(square_area(x)-y_correct)<1e-4)
y =
12.5000
|
351 Solvers
177 Solvers
257 Solvers
Compute LOG(1+X) in natural log
204 Solvers
443 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!