Cody

# Problem 425. ranch area?

Solution 117513

Submitted on 23 Jul 2012 by Aurelien Queffurust
• Size: 14
• This is the leading solution.
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=@(x)1+x/10^10; acres=round(ranch(y)); acres_correct = 640; assert(acres==acres_correct)

ans = 640.0000

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

ans = 320.0000

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

ans = 960

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

ans = 1.5742e+03

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

ans = 2.4585e+03

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!