Cody

# Problem 42817. Pipeline

Solution 1900818

Submitted on 15 Aug 2019
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()

2   Pass
assert(isequal(cos(sin(1)), 1>@sin>@cos))

[Warning: Function gt has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In ScoringEngineTestPoint2 (line 1) In solutionTest (line 5)]

3   Pass
x = rand(10,'single'); assert(isequal(sum(sum(x>.2)), x>.2>@sum>@sum))

4   Fail
a = rand(100); [x,y] = find(tan(a)>.1); [x1,y1] = a> @tan > .1 > @find; assert(isequal({x,y},{x1,y1}))

Error using > Too many output arguments. Error in Test4 (line 3) [x1,y1] = a> @tan > .1 > @find;

5   Fail
a = rand(1,100); a> @(x)x.^2+1 > @cos > @sin > @sum > @(x)isequal(x,sum(sin(cos(a.^2+1)))) > @assert

Error using assert Too many output arguments. Error in > (line 2) if (isa(A,'numeric') || isa(A,'logical')) && isa(B,'function_handle') C=B(A); else C = builtin('gt',A,B);end Error in Test5>@(x)isequal(x,sum(sin(cos(a.^2+1))))>@assert Error in > (line 2) if (isa(A,'numeric') || isa(A,'logical')) && isa(B,'function_handle') C=B(A); else C = builtin('gt',A,B);end Error in Test5>@(x)x.^2+1>@cos>@sin>@sum>@(x)isequal(x,sum(sin(cos(a.^2+1))))>@assert Error in > (line 2) if (isa(A,'numeric') || isa(A,'logical')) && isa(B,'function_handle') C=B(A); else C = builtin('gt',A,B);end Error in Test5 (line 2) a> @(x)x.^2+1 > @cos > @sin > @sum > @(x)isequal(x,sum(sin(cos(a.^2+1)))) > @assert