2. In this problem we will work with a rotation matrix. Rotation matrices are commonly used for computations in fields such as geometry, physics, and computer graphics. In 3D space, we can rotate an object at position x = (x, y, z) using a rotation matrix. The position x is a column vector representing the x, y, and z coordinates. To rotate the vector counterclockwise by angle about the z-axis, you can multiply x by R(0) [100 0 cos - sin cost 0 sin For b= R(0)x, b is the rotated vector x. (a) Write an in-line function that takes in an angle Using this, calculate R(7/4) and save this as A4. and returns the matrix R(0). (b) Rotate the vector x = (-2.3, e, ) about the z-axis using the angle /3. Save the resulting 3 x 1 vector as A5. (c) Suppose we have already obtained the 3x1 vector b = (1.2, 3.1,-) from rotating z around the x-axis by an angle of 7/5. Find r from solving the equation b R(0)r using standard methods (backslash in MATLAB or solve in Python). Save the resulting vector as A6. (d) Find the inverse of the matrix R(7/2) using built-in methods (inv in MATLAB or scipy, linalg.inv in Python). Save you answer as A7. (e) This is an application where inverse matrices are used quite often, but it is still a bad idea to actually use the inverse command. But can we figure out an easier way to do it? The inverse of a rotation is just another rotation. That is, R(0)- R(6), where is a different angle. Find the angle o such that R(3/4)-¹ R(o). Save this answer in a variable named A8. (This does not require any code, just some geometric reasoning. If you rotate a vector by an angle 0, what would you have to do to rotate the vector back to where it started? The answer is not unique, because adding any multiple of 27 to an angle gives the same rotation matrix. Your answer should be between - and 7.) =
2. In this problem we will work with a rotation matrix. Rotation matrices are commonly used for computations in fields such as geometry, physics, and computer graphics. In 3D space, we can rotate an object at position x = (x, y, z) using a rotation matrix. The position x is a column vector representing the x, y, and z coordinates. To rotate the vector counterclockwise by angle about the z-axis, you can multiply x by R(0) [100 0 cos - sin cost 0 sin For b= R(0)x, b is the rotated vector x. (a) Write an in-line function that takes in an angle Using this, calculate R(7/4) and save this as A4. and returns the matrix R(0). (b) Rotate the vector x = (-2.3, e, ) about the z-axis using the angle /3. Save the resulting 3 x 1 vector as A5. (c) Suppose we have already obtained the 3x1 vector b = (1.2, 3.1,-) from rotating z around the x-axis by an angle of 7/5. Find r from solving the equation b R(0)r using standard methods (backslash in MATLAB or solve in Python). Save the resulting vector as A6. (d) Find the inverse of the matrix R(7/2) using built-in methods (inv in MATLAB or scipy, linalg.inv in Python). Save you answer as A7. (e) This is an application where inverse matrices are used quite often, but it is still a bad idea to actually use the inverse command. But can we figure out an easier way to do it? The inverse of a rotation is just another rotation. That is, R(0)- R(6), where is a different angle. Find the angle o such that R(3/4)-¹ R(o). Save this answer in a variable named A8. (This does not require any code, just some geometric reasoning. If you rotate a vector by an angle 0, what would you have to do to rotate the vector back to where it started? The answer is not unique, because adding any multiple of 27 to an angle gives the same rotation matrix. Your answer should be between - and 7.) =
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Matlab ones
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education