Question
6. Write a script as a user-defined function with the function name of Cal_2DRot_[YOUR WSU ID], to determine the linearly transformed coordinates, X, Y in
6. Write a script as a user-defined function with the function name of Cal_2DRot_[YOUR WSU ID], to determine the linearly transformed coordinates, X, Y in 2D counter-clockwise rotation by receiving three inputs, i.e., x-, and y-coordinates for the old positions, x in [m], and y in [m], respectively, and counter-clockwise rotation angle, in [rad] (counter-clockwise rotation direction should be positive). NOTE: you need to save this script as Cal_2DRot_[YOUR WSU ID].m. You may want to review an article to solve the problem (https://en.wikipedia.org/wiki/Transformation_matrix).
What are the linearly transformed coordinates, X, Y with the counter-clockwise, 2D, theta = pi/4 rotation of the original position given at x = 0.5 [m], and y = 0 [m]?
6. Write a script as a user-defined function with the function name of Cal_2DRot_(YOUR WSU ID], to determine the linearly transformed coordinates, X, Y in 2D counter-clockwise rotation by receiving three inputs, i.e., x-, and y-coordinates for the old positions, x in [m], and y in [m], respectively, and counter-clockwise rotation angle, o in [rad] (counter-clockwise rotation direction should be positive). NOTE: you need to save this script as Cal_2DRot_(YOUR WSU ID].m. You may want to review an article to solve the problem (https://en.wikipedia.org/wiki/Transformation_matrix). What are the linearly transformed coordinates, X, Y with the counter-clockwise, 2D, O = T/4 rotation of the original position given at x = 0.5 [m], and y=0 [m]? (2 pt) | Template for the Octave (or Matlab) function writing in a script editor function (X, Y) = Cal_2 DRot_(YOUR WSU ID] (x, y, theta) (YOUR SCRIPT SHOULD BE GIVEN HERE] end | Template for the Octave (or Matlab) function calling in a command window >> x = 0.5; y= 0; theta = pi/4; [X, Y) = Cal_2DRot (YOUR WSU ID](x, y, theta)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