Cody

Solution 304607

Submitted on 15 Aug 2013 by Alfonso Nieto-Castanon
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
%% x = rand(2,2,2); y = neg2(neg2(x)); y_correct = -x; assert(isequal(y,y_correct))

ans = @(~)x

2   Pass
%% x = []; y = neg2(neg2(x)); y_correct = -x; assert(isequal(y,y_correct))

ans = @(~)x

3   Pass
%% x = sqrt(-5); y = neg2(neg2(x)); y_correct = -x; assert(isequal(y,y_correct))

ans = @(~)x

4   Pass
%% What does a single call give? x = rand; disp(neg2(x))

ans = @(~)x @(~)x