Solution 1872764

Submitted on 12 Jul 2019
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
tic; N=10^6; x=rand(1,N); y=Aye(N); assert(numel(y)==N*N) assert(isequal(x*y,x)) assert(toc<2)

Error using eye Requested 1000000x1000000 (7450.6GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for more information. Error in Aye (line 2) y = eye(N); Error in Test1 (line 4) y=Aye(N);

Suggested Problems

More from this Author100