Cody

# Problem 1116. Calculate the height of an object dropped from the sky

Solution 259982

Submitted on 12 Jun 2013 by Dan
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
%% t = -1; h_correct = 1000; assert(abs(height_of_object_at_time(t)-h_correct)<0.1)

``` ans = 1.0e+03 * Columns 1 through 10 1.0000 1.0000 0.9951 0 0 0 0 0 0 0 Columns 11 through 17 0 0.5100 0 0 0 0 0 ans = 1000 ```

2   Pass
%% t = 0; h_correct = 1000; assert(abs(height_of_object_at_time(t)-h_correct)<0.1)

``` ans = 1.0e+03 * Columns 1 through 10 1.0000 1.0000 0.9951 0 0 0 0 0 0 0 Columns 11 through 17 0 0.5100 0 0 0 0 0 ans = 1000 ```

3   Pass
%% t = 1; h_correct = 995.1; assert(abs(height_of_object_at_time(t)-h_correct)<0.1)

``` ans = 1.0e+03 * Columns 1 through 10 1.0000 1.0000 0.9951 0 0 0 0 0 0 0 Columns 11 through 17 0 0.5100 0 0 0 0 0 ans = 995.1000 ```

4   Pass
%% t = 10; h_correct = 510; assert(abs(height_of_object_at_time(t)-h_correct)<0.1)

``` ans = 1.0e+03 * Columns 1 through 10 1.0000 1.0000 0.9951 0 0 0 0 0 0 0 Columns 11 through 17 0 0.5100 0 0 0 0 0 ans = 510 ```

5   Pass
%% t = 15; h_correct = 0; assert(abs(height_of_object_at_time(t)-h_correct)<0.1)

``` ans = 1.0e+03 * Columns 1 through 10 1.0000 1.0000 0.9951 0 0 0 0 0 0 0 Columns 11 through 17 0 0.5100 0 0 0 0 0 ans = 0 ```