Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
a = 3;
b = 4;
P_correct = 22.103492160709504;
assert(abs(ellipsePerim(a,b)-P_correct)/P_correct<1e-8)
P =
22.1035
|
2 | Pass |
a = 4;
b = 3;
P_correct = 22.103492160709504;
assert(abs(ellipsePerim(a,b)-P_correct)/P_correct<1e-8)
P =
22.1035
|
3 | Pass |
a = 1;
b = 8;
P_correct = 32.744956600195508;
assert(abs(ellipsePerim(a,b)-P_correct)/P_correct<1e-8)
P =
32.7448
|
4 | Pass |
a = 1;
b = 0.974062207869516;
P_correct = 6.201967;
assert(abs(ellipsePerim(a,b)-P_correct)/P_correct<1e-8)
P =
6.2020
|
5 | Pass |
a = 4*rand(1);
b = a;
P_correct = 2*pi*a;
assert(abs(ellipsePerim(a,b)-P_correct)/P_correct<1e-8)
P =
7.0651
|
17209 Solvers
Back to basics 20 - singleton dimensions
254 Solvers
Generate a random matrix A of (1,-1)
210 Solvers
184 Solvers
363 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!