Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started