Problem 175. Double Deal

Solution 182869

Submitted on 29 Dec 2012
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
%% x = 1:10; [a,b,c,d] = doubleDeal(x); y_correct = 1:4; assert(isequal([a b c d],y_correct))

Error: Output argument "a" (and maybe others) not assigned during call to "/users/msssystem6/doubleDeal.m>doubleDeal".

2   Fail
%% x = randn(1,1000); y = cell(1,1000); [y{:}] = doubleDeal(x); y_correct = x; assert(isequal([y{:}],y_correct))

Error: Too many output arguments.