Solution 454502

Submitted on 13 Jun 2014 by Guillaume
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% x = 1; y_correct = 1; sum_up = 5*rand; n = randi(10); sum_array = []; for i = 1:n sum_array(i,1) = fill_array_sum_up_to(sum_up,n,sum_array); end assert(isequal([sum(sum_array) length(sum_array)],[sum_up n]));