Solution 776296

Submitted on 11 Nov 2015 by Peng Liu
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
%% % 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

[Warning: Function rehash has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]

Suggested Problems

More from this Author8