Cody

Solution 2110965

Submitted on 30 Jan 2020 by Rohith PK
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   Pass
format compact hstart=0;vstart=50; [long_d thetamax]=ballistics(hstart,vstart) dl=abs(long_d-254.841997961264) dt=abs(thetamax-45) assert(and(dl<1e-6,dt<1e-6))

long_d = 2.548419979612640e+02 thetamax = 45 dl = 0 dt = 0

2   Pass
hstart=100;vstart=20; [long_d thetamax]=ballistics(hstart,vstart) dl=abs(long_d-99.08340778978895) dt=abs(thetamax-67.63189529197281) assert(and(dl<1e-6,dt<1e-6))

long_d = 99.083407789788922 thetamax = 67.631895708171001 dl = 2.842170943040401e-14 dt = 4.161981905781431e-07

3   Pass
hstart=100;vstart=50; [long_d thetamax]=ballistics(hstart,vstart) dl=abs(long_d-340.4597531532057) dt=abs(thetamax-53.1842963916761) assert(and(dl<1e-6,dt<1e-6))

long_d = 3.404597531532056e+02 thetamax = 53.184296770950418 dl = 1.136868377216160e-13 dt = 3.792743186181724e-07

4   Pass
hstart=50;vstart=100; [long_d thetamax]=ballistics(hstart,vstart) dl=abs(long_d-1068.198437549283) dt=abs(thetamax-46.33996589024096) assert(and(dl<1e-6,dt<1e-6))

long_d = 1.068198437549282e+03 thetamax = 46.339966152508964 dl = 6.821210263296962e-13 dt = 2.622680028707691e-07

5   Pass
hstart=30;vstart=30; [long_d thetamax]=ballistics(hstart,vstart) dl=abs(long_d-117.9889278221855) dt=abs(thetamax-52.13289838740581) assert(and(dl<1e-6,dt<1e-6))

long_d = 1.179889278221855e+02 thetamax = 52.132898126551737 dl = 1.421085471520200e-14 dt = 2.608540725645980e-07