Cody

# Problem 539. Fun Race

Solution 118176

Submitted on 24 Jul 2012 by Aurelien Queffurust
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
%% foo=@cosh; goo=@(x)sqrt(cosh(x)+pi); winner=[]; for k=1:10; winner(end+1)=race(foo,goo); end assert(all(winner==1))

size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11 size1 = 3 size2 = 11

2   Pass
%% foo=@num2str; goo=@log10; winner=[]; for k=1:10; winner(end+1)=race(foo,goo); end assert(all(winner==2))

winner = 2 winner = 2 winner = 2 winner = 2 winner = 2 winner = 2 winner = 2 winner = 2 winner = 2 winner = 2

3   Pass
%% foo=@gamma; goo=@sign; winner=[]; for k=1:10; winner(end+1)=race(foo,goo); end assert(all(winner==1))

size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3 size1 = 3 size2 = 3

### Community Treasure Hunt

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

Start Hunting!