Cody

Problem 449. Grandpa's telescope

Solution 584352

Submitted on 18 Feb 2015
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
%% d=200; b=100; p=0.5; mm = telescope(d,b,p) mm_correct = 21 assert(abs(round(abs(mm))- mm_correct)<1000*eps)

Error: Attempt to execute SCRIPT varargin as a function: /opt/mlsedu/matlab/R2014b/toolbox/matlab/lang/varargin.m

2   Fail
%% d=100; b=200; p=0.5; mm = telescope(d,b,p) mm_correct = 21 assert(abs(round(abs(mm))- mm_correct)<1000*eps)

Error: Attempt to execute SCRIPT varargin as a function: /opt/mlsedu/matlab/R2014b/toolbox/matlab/lang/varargin.m

3   Fail
%% d=100; b=100; p=0.5; mm = telescope(d,b,p) mm_correct = 0 assert(round(abs(mm))== mm_correct)

Error: Attempt to execute SCRIPT varargin as a function: /opt/mlsedu/matlab/R2014b/toolbox/matlab/lang/varargin.m

Suggested Problems

More from this Author100