Cody

# Problem 44819. Relative pose in 2D: problem 1

Solution 2600500

Submitted on 23 Jun 2020
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
T = user_function assert(all(size(T)==3), 'The matrix must be 3x3'); assert(isreal(T), 'The matrix must be real, not complex');

Undefined function 'rot' for input arguments of type 'string'. Error in user_function (line 3) r=rot(225,"deg"); Error in Test1 (line 1) T = user_function

2   Fail
T = user_function assert(isequal(T(3,:), [0 0 1]), 'The bottom row of the homogeneous transformation matrix is not correct')

Undefined function 'rot' for input arguments of type 'string'. Error in user_function (line 3) r=rot(225,"deg"); Error in Test2 (line 1) T = user_function

3   Fail
T = user_function assert(isequal(T(1,3),123), 'The representation of the x-coordinate is not correct')

Undefined function 'rot' for input arguments of type 'string'. Error in user_function (line 3) r=rot(225,"deg"); Error in Test3 (line 1) T = user_function

4   Fail
T = user_function assert(isequal(T(2,3),-74.6), 'The representation of the y-coordinate is not correct')

Undefined function 'rot' for input arguments of type 'string'. Error in user_function (line 3) r=rot(225,"deg"); Error in Test4 (line 1) T = user_function

5   Fail
T = user_function R = T(1:2,1:2); assert( abs(det(R)-1) < 0.01, 'The determinant of the rotation submatrix is not correct')

Undefined function 'rot' for input arguments of type 'string'. Error in user_function (line 3) r=rot(225,"deg"); Error in Test5 (line 1) T = user_function

6   Fail
T = user_function R = T(1:2,1:2); assert( abs(atan2d(R(2,1), R(1,1)) + 112.5) < 0.1, 'The rotation matrix is not correct, check your calculation of the heading SSW and whether you are using radians or degrees')

Undefined function 'rot' for input arguments of type 'string'. Error in user_function (line 3) r=rot(225,"deg"); Error in Test6 (line 1) T = user_function