Question: using Matlab Consider two column vectors rai b a= a2 and b= b2 | b3 The dot product between a and b is given by

using Matlabusing Matlab Consider two column vectors rai b a= a2 and b=

Consider two column vectors rai b a= a2 and b= b2 | b3 The dot product between a and b is given by the scalar d=a. b = a*b = a;b + a2b2 + a3b3- The dot product also satisfies the relationship a. b = |a||||b|| cos(@) where ||a|= va a is the length of a and is the angle between a and b. The cross product between a and b is given by the column vector c= axb= C2 with c = abz - agb2 C2 = 23b a1b3 C3 = a1b2 - azbi Write a script that prompts the user for two column vectors, a and b. The script should then calculate and print the dot product between a and b, the length of a, the length of b, the angle between a and b, and the cross product between a and b. Do not use the built-in functions dot or cross. Sample output: Enter column vector A: [ 1.5; -2; 5] Enter column vector B: [ 3; -2.25; -6 ] The dot product of A and B is -21.0000 The length of A is 5.5902 The length of Bis 7.0755 The angle between A and B is 2.1305 The cross product between A and B is: 23. 2500 24.0000 2.6250 Enter column vector A: [ 1; 1; 1] Enter column vector B: [ -3.25; 5; -1.7654 ] The dot product of A and B is -0.0154 The length of A is 1.7321 The length of B is 6.2193 The angle between A and B is 1.5722 The cross product between A and B is: -6.7654 -1.4846 8.2500

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!