Cody

Problem 43046. Non trivial identities - reshape

Solution 1688167

Submitted on 7 Dec 2018
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
for k=1:20 x=randi(7,randi(13),randi(12)); assert(isequal(identity(x),x)); end assert(~isempty(strfind(fileread('identity.m'), 'reshape')),'use reshape')

Output argument "ans" (and maybe others) not assigned during call to "identity". Error in Test1 (line 3) assert(isequal(identity(x),x));

Suggested Problems

More from this Author14

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!