Challenge: Combined Transformations of a Vector
Apply a scaling transformation and a 90° rotation to a 2D vector using Python and matrix multiplication. Visualize the result with arrows and coordinate labels from the origin.
You're working with a vector:
v=[23]You will:
-
Apply a scaling matrix:
S=[2000.5] -
Apply a rotation matrix:
R=[23] -
Combine them as:
This simulates what happens when a vector is first scaled and then rotated.
Swipe to start coding
-
Complete the Python code below to:
-
Define the original vector;
-
Apply the scaling and rotation matrices;
-
Plot all vectors with labeled tips and coordinate axes;
-
-
Verify that the output vectors are correct.
Løsning
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Awesome!
Completion rate improved to 1.89
Challenge: Combined Transformations of a Vector
Stryg for at vise menuen
Apply a scaling transformation and a 90° rotation to a 2D vector using Python and matrix multiplication. Visualize the result with arrows and coordinate labels from the origin.
You're working with a vector:
v=[23]You will:
-
Apply a scaling matrix:
S=[2000.5] -
Apply a rotation matrix:
R=[23] -
Combine them as:
This simulates what happens when a vector is first scaled and then rotated.
Swipe to start coding
-
Complete the Python code below to:
-
Define the original vector;
-
Apply the scaling and rotation matrices;
-
Plot all vectors with labeled tips and coordinate axes;
-
-
Verify that the output vectors are correct.
Løsning
Tak for dine kommentarer!
Awesome!
Completion rate improved to 1.89single