Cody

Solution 1796362

Submitted on 24 Apr 2019 by praharsh
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
x = [ 0 0 -1 2 1 0 0 3 0 -1 0 4 0 0 0 1]; err = x * your_fcn_name(x) - eye(4,4); assert(sum(sum(abs(err))) < 10*eps) % Test for inv usage pattern = '@inv|@pinv|inv\(|pinv\('; fid = fopen(which('your_fcn_name'), 'r'); c = onCleanup(@()fclose(fid)); tline = fgetl(fid); while ischar(tline), if ~isempty(regexp(tline, pattern)) error('Don''t use inv() or pinv()'); end tline = fgetl(fid); end

Suggested Problems