Cody

Solution 1876896

Submitted on 17 Jul 2019 by Gergely Patay
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 = [1 -1 0; 1 1 0; 0 0 sqrt(2)]/sqrt(2); err = x * your_fcn_name(x) - eye(3,3); assert(norm(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

More from this Author17