Problem 44890. Invert a 3D rotation matrix

Solution 2064584

Submitted on 20 Dec 2019 by Martin C.
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 Author16

Community Treasure Hunt

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

Start Hunting!