Cody

Solution 739008

Submitted on 18 Sep 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
%% y=@(x)1+x/10^10; acres=round(ranch(y)); acres_correct = 640; assert(acres==acres_correct)

Error: <a href="matlab: opentoline('/users/mss.system.oNsAuX/ranch.m',2,3)">File: ranch.m Line: 2 Column: 3 </a>"acres" was previously used as a variable, conflicting with its use here as the name of a function or command. See <a href="matlab: helpview([docroot '/techdoc/matlab_prog/matlab_prog.map'],'function_call_command_syntax')">"How MATLAB Recognizes Command Syntax" in the MATLAB documentation</a> for details.

2   Fail
%% y=@(x)0.5+x/10^10; acres=round(ranch(y)); acres_correct = 320; assert(acres==acres_correct)

Error: <a href="matlab: opentoline('/users/mss.system.oNsAuX/ranch.m',2,3)">File: ranch.m Line: 2 Column: 3 </a>"acres" was previously used as a variable, conflicting with its use here as the name of a function or command. See <a href="matlab: helpview([docroot '/techdoc/matlab_prog/matlab_prog.map'],'function_call_command_syntax')">"How MATLAB Recognizes Command Syntax" in the MATLAB documentation</a> for details.

3   Fail
%% y=@(x)1+x; acres=round(ranch(y)); acres_correct = 960; assert(acres==acres_correct)

Error: <a href="matlab: opentoline('/users/mss.system.oNsAuX/ranch.m',2,3)">File: ranch.m Line: 2 Column: 3 </a>"acres" was previously used as a variable, conflicting with its use here as the name of a function or command. See <a href="matlab: helpview([docroot '/techdoc/matlab_prog/matlab_prog.map'],'function_call_command_syntax')">"How MATLAB Recognizes Command Syntax" in the MATLAB documentation</a> for details.

4   Fail
%% y=@(x)2+sin(x); acres=round(ranch(y)); acres_correct = 1574; assert(acres==acres_correct)

Error: <a href="matlab: opentoline('/users/mss.system.oNsAuX/ranch.m',2,3)">File: ranch.m Line: 2 Column: 3 </a>"acres" was previously used as a variable, conflicting with its use here as the name of a function or command. See <a href="matlab: helpview([docroot '/techdoc/matlab_prog/matlab_prog.map'],'function_call_command_syntax')">"How MATLAB Recognizes Command Syntax" in the MATLAB documentation</a> for details.

5   Fail
%% y=@(x)3+cos(x); acres=round(ranch(y)); acres_correct = 2459; assert(acres==acres_correct)

Error: <a href="matlab: opentoline('/users/mss.system.oNsAuX/ranch.m',2,3)">File: ranch.m Line: 2 Column: 3 </a>"acres" was previously used as a variable, conflicting with its use here as the name of a function or command. See <a href="matlab: helpview([docroot '/techdoc/matlab_prog/matlab_prog.map'],'function_call_command_syntax')">"How MATLAB Recognizes Command Syntax" in the MATLAB documentation</a> for details.