Question: please help on number 7 Problem 7 Write a Matlab function R = ang2R(ang, ax, units) called that represents a primary axis rotation (X, Y,
please help on number 7
Problem 7 Write a Matlab function R = ang2R(ang, ax, units) called that represents a primary axis rotation (X, Y, or Z) by angle in 3D space. Inputs should be a rotation angle (scalar), rotation axis (string), and units (string). Output should be a 3x3 rotation matrix R. The function should work for radians and degrees. (Hint: use the strcmp command to compare strings.) Check your function by hand for X, Y, and Z rotations separately. Problem 8 Write a Matlab function [k, theta] = R2kTheta(R) that converts a rotation matrix to an axis and angle. The input should be a 3x3 rotation matrix R. Outputs should be axis unit vector k and angle (rad)
Step by Step Solution
There are 3 Steps involved in it

Get step-by-step solutions from verified subject matter experts