Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions