Cody

Solution 1742519

Submitted on 4 Mar 2019
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
m = 5.98e24/81; % Moon y_correct = 1e-4; % m assert(isequal(Schwarzschild_radius(m),y_correct))

y = 3.2957e+10 ans = 2.6504

Assertion failed.

2   Fail
m = 5.98e24; % Earth y_correct = 0.0089; % m assert(isequal(Schwarzschild_radius(m),y_correct))

y = 2.6695e+12 ans = 2.6504

Assertion failed.

3   Fail
m = 1.89813e27; % Jupiter y_correct = 2.819; % m assert(isequal(Schwarzschild_radius(m),y_correct))

y = 8.4734e+14 ans = 2.6504

Assertion failed.

4   Fail
m = 2e30; % Sun y_correct = 2970.2416; % m assert(isequal(Schwarzschild_radius(m),y_correct))

y = 8.9282e+17 ans = 2.6504

Assertion failed.

Suggested Problems

More from this Author13