Outline
Complete the implementation of the VectorRotate function. Thefunction rotates the input column vector, a, by 45 degrees to getb. It then rotates b by 45 degrees to get c. It then checks thatthe c is perpendicular to a to a tolerance of 1e-10. If they areequal within tolerance, then d should equal 1. Otherwise, d shouldequal zero.
Step 1: Create a rotation matrixR =
cos(θ)-sin(θ)sin(θ)cos(θ)
.
Step 2: Rotate the vector by 45 degrees twice.To rotate a 2D column vector a, by an angle θ,apply the matrix multiplication a_rot =R a.
Step 3: Use an if statement to check whetherthe corresponding vector c is perpendicular
PayPal Gateway not configured
PayPal Gateway not configured