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
Takk for tilbakemeldingene dine!
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Can you show me the Python code for these transformations and the visualization?
Can you explain step by step how the scaling and rotation matrices are applied?
What would the final transformed vector coordinates be?
Awesome!
Completion rate improved to 1.89
Challenge: Combined Transformations of a Vector
Sveip for å vise menyen
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
Takk for tilbakemeldingene dine!
Awesome!
Completion rate improved to 1.89single