Question: Write a MATLAB code that ask users enter two vectors vec ( a ) and vec ( b ) in R ^ 3 as inputs

Write a MATLAB code that ask users enter two vectors vec(a) and vec
(b) in R^3 as inputs and it outputs five results:
Output 1: dot product vec(a)*vec(b)
Output 2: cross product vec(a) x vec(b)
Output 3: smallest angle among vectors
Output 4: normal vector vec(n) as specified above
Output 5: shortest distance D0 as specified above
Consider the vectors a =(3,-1,7) and b =(4,2,9) Answer the following questions:
1. Evaluate the dot product a. b. Show all your steps. [0.5 mark]
2. Evaluate the cross producta *b Show all your steps. [0.5 mark]
3. Find the angle among the vectors using dot product. Show all your steps. [0.5 mark]
4. Find the angle among the vectors using cross product. Show all your steps. [0.5 mark]
5. Find the angle among the vectors using dot and cross products. Show all your steps. [0.5 mark]
6. Find a normal vector n to a plane that contains vec a and b has a direction ba and a magnitude of 3/5 units. Show all your steps. [0.5 mark]
7. What is the shortest distance D_{0} between the heads of vectors vec a and b where these vectors are placed on the coordinate system in such a way that their tails coincide at the origin. Show all your steps. [0.5 mark]
8. Write a MATLAB code that ask users to enter two vectors overline a and b in \mathbb{R}^3 as inputs and it outputs five results:
Output 1: dot product overline ab
Output 2: cross product ab
Output 3: smallest an among vectors
Output 4: normal vector overline n as specified above
Output 5: shortest distance D_{0} as specified above.

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!