Problem 2448. Back to the future

Solution 938731

Submitted on 19 Aug 2016
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
% Create necessary files fid = fopen('myfunction.m', 'w');fprintf(fid, 'function [a, b]=myfunction(), a=rand; b=@()1;');fclose(fid); rehash; % Execute my function 10 times y=cell(10,1); for iter=1:10 [x y{iter}]=myfunction(); end % Ouch! I have overwritten the value of "x" % Your task is to recover the value of the 3rd "x" % Now I am downloading my secret solver urlwrite('','my_secret_solver.p'); rehash; % I compare your solution with my secret solver to see how you have done if my_secret_solver~=your_solution, fail{-1}, end

Error using my_secret_solver Index exceeds matrix dimensions.

Suggested Problems

More from this Author8