Cody

Solution 220710

Submitted on 22 Mar 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
%% y= 27.988056; x= 86.925278; h_correct = 8815.715; assert(abs(h_correct-your_fcn_name(y,x))<1)

ans = { "results" : [ { "elevation" : 8815.71582031250, "location" : { "lat" : 27.9880560, "lng" : 86.92527800000001 }, "resolution" : 152.7032318115234 } ], "status" : "OK" }

2   Pass
%% y=19.823159; x=-155.470223; h_correct = 4172.297; assert(abs(h_correct-your_fcn_name(y,x))<1)

ans = { "results" : [ { "elevation" : 4173.24511718750, "location" : { "lat" : 19.8231590, "lng" : -155.4702230 }, "resolution" : 19.08790397644043 } ], "status" : "OK" }

3   Pass
%% y=40.689254; x=-74.044559; h_correct = 2.059; assert(abs(h_correct-your_fcn_name(y,x))<1)

ans = { "results" : [ { "elevation" : 2.059000730514526, "location" : { "lat" : 40.6892540, "lng" : -74.04455900000001 }, "resolution" : 76.35161590576172 } ], "status" : "OK" }

4   Pass
%% y=25.324167,x=-90.007325 h_correct = -3458.672; assert(abs(h_correct-your_fcn_name(y,x))<1)

y = 25.3242 x = -90.0073 ans = { "results" : [ { "elevation" : -3458.688964843750, "location" : { "lat" : 25.3241670, "lng" : -90.00732499999999 }, "resolution" : 76.35161590576172 } ], "status" : "OK" }

5   Pass
%% y=11.35, x=142.2 h_correct = -10323.318; assert(abs(h_correct-your_fcn_name(y,x))<1)

y = 11.3500 x = 142.2000 ans = { "results" : [ { "elevation" : -10323.3183593750, "location" : { "lat" : 11.350, "lng" : 142.20 }, "resolution" : 610.8129272460938 } ], "status" : "OK" }

6   Pass
%% y=50.335556; x=6.9475; h_correct = 620.046; assert(abs(h_correct-your_fcn_name(y,x))<1)

ans = { "results" : [ { "elevation" : 620.0443115234375, "location" : { "lat" : 50.3355560, "lng" : 6.94750 }, "resolution" : 152.7032318115234 } ], "status" : "OK" }

7   Pass
%% filetext = fileread('your_fcn_name.m'); assert(isempty(strfind(filetext, 'switch'))) assert(isempty(strfind(filetext, 'case'))) assert(isempty(strfind(filetext, 'if'))) assert(isempty(strfind(filetext, 'dot'))) assert(isempty(strfind(filetext, 'while')))

Suggested Problems

More from this Author2