Dot Product in Matlab PDF

Title Dot Product in Matlab
Course Linear Algebra With Matlab
Institution Technological Institute of the Philippines
Pages 5
File Size 281.3 KB
File Type PDF
Total Downloads 49
Total Views 146

Summary

Download Dot Product in Matlab PDF


Description

MATLAB ACTIVITY 6 – Dot Product & Orthogonal in MATLAB Enter the MATLAB syntax you used and MATLAB output in the space provided 1. Find the length, distance , angle between v = 1 4 −1 , w = 7 2 0

LENGTH:

DISTANCE:

ANGLE:

2 4  − 1 2   v= w=  0 3      6  , and  − 1 are orthogonal. Explain why they are orthogonal or why not. 2. Determine if

Since the dot product of the vectors is 0, they are orthogonal. Two vectors are orthogonal if and only if x · y = 0.

B. Let a = 3 − 2 1 , Find a value for k so that the dot product of a with b = k 1 4 is zero. Verify your result in MATLAB. Enter your solutions and MATLAB output in space provided.

Solving for k: 𝑎 = [3 − 2 1] 𝑏 = [𝑘 1 4] 𝑎1 𝑏1 + 𝑎2 𝑏2 + 𝑎3 𝑏3 = 0 (3)(k) + (−2)(1) + (1)(4) = 0 3k − 2 + 4 = 0 3𝑘 = −2 𝒌=−

𝟐 𝟑

C. For each of the following vectors v, compute dot(v,v) in MATLAB. Enter the MATLAB syntax you used and MATLAB output in the space provided

1. v = 4 2 − 3

2. v = − 9 3 1 0 6

 1   2  v=  − 5    − 3  3.

Describe and differentiate the dot product of each vector They are all positive values. They are not (and will never be) orthogonal since they are the same vector. The higher number of element/s and value/s leads to higher dot product. The three vectors uses the same syntax (dot(v,v)) to get their dot product....


Similar Free PDFs