Question: Q2. Write a python code to do the following operations. 1. Create three vectors in 3D space in form of NumPy arrays: 1.0 -3.0 -0.01

 Q2. Write a python code to do the following operations. 1.

Q2. Write a python code to do the following operations. 1. Create three vectors in 3D space in form of NumPy arrays: 1.0 -3.0 -0.01 ai = 2.1 a2 = 0.1 a3 = 10 3.2 -2.2 5.2 2. Define a function vec_proj () which takes in two vectors (NumPy arrays) and returns the projection of the first vector on the second vector. Then, apply this function to calculate the projection of a2 on aj and the projection of aj on a2. 3. Define a function vec_angle () which takes in two vectors (NumPy arrays) and returns the angle (in degree) between these two vectors. Then, apply this function to calculate the angle between aj and a2, the angle between a2 and a3, and the angle between az and aj. 4. Define a function vec_vol() which takes in three vectors (NumPy arrays) and returns the area of the parallelepiped spanned by these three vectors. Then, apply this function to calculate the area of the parallelepiped spanned by aj, a2 and az

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!